Skip to content

Commit

Permalink
Check argument types on HTTP1.request/5 the same way we do in HTTP2
Browse files Browse the repository at this point in the history
  • Loading branch information
britto committed Aug 17, 2022
1 parent a947ca3 commit 4749efb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mint/http1.ex
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ defmodule Mint.HTTP1 do
{:error, conn, wrap_error(:request_body_is_streaming)}
end

def request(%__MODULE__{} = conn, method, path, headers, body) do
def request(%__MODULE__{} = conn, method, path, headers, body)
when is_binary(method) and is_binary(path) and is_list(headers) do
%__MODULE__{transport: transport, socket: socket} = conn

headers =
Expand Down

0 comments on commit 4749efb

Please sign in to comment.