Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/plug/method_override.ex
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ defmodule Plug.MethodOverride do
end

defp override_method(%Plug.Conn{} = conn, body_params) do
with method when is_binary(method) <- body_params["_method"] || "",
with method when is_binary(method) <- body_params["_method"],
method = String.upcase(method, :ascii),
true <- method in @allowed_methods do
%{conn | method: method}
Expand Down