aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gun_http2.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gun_http2.erl b/src/gun_http2.erl
index 8d8e93d..3468448 100644
--- a/src/gun_http2.erl
+++ b/src/gun_http2.erl
@@ -247,7 +247,8 @@ request(State=#http2_state{socket=Socket, transport=Transport,
true -> nofin;
false -> fin
end,
- {ok, StreamID, HTTP2Machine1} = cow_http2_machine:init_stream(Method, HTTP2Machine0),
+ {ok, StreamID, HTTP2Machine1} = cow_http2_machine:init_stream(
+ iolist_to_binary(Method), HTTP2Machine0),
{ok, PseudoHeaders, Headers} = prepare_headers(State, Method, Host, Port, Path, Headers0),
{ok, IsFin, HeaderBlock, HTTP2Machine} = cow_http2_machine:prepare_headers(
StreamID, HTTP2Machine1, IsFin0, PseudoHeaders, Headers),
@@ -260,7 +261,8 @@ request(State=#http2_state{socket=Socket, transport=Transport,
StreamRef, ReplyTo, Method, Host, Port, Path, Headers0, Body) ->
Headers1 = lists:keystore(<<"content-length">>, 1, Headers0,
{<<"content-length">>, integer_to_binary(iolist_size(Body))}),
- {ok, StreamID, HTTP2Machine1} = cow_http2_machine:init_stream(Method, HTTP2Machine0),
+ {ok, StreamID, HTTP2Machine1} = cow_http2_machine:init_stream(
+ iolist_to_binary(Method), HTTP2Machine0),
{ok, PseudoHeaders, Headers} = prepare_headers(State, Method, Host, Port, Path, Headers1),
{ok, IsFin, HeaderBlock, HTTP2Machine} = cow_http2_machine:prepare_headers(
StreamID, HTTP2Machine1, nofin, PseudoHeaders, Headers),