aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-09-18 17:01:25 +0200
committerLoïc Hoguin <[email protected]>2020-09-21 15:52:26 +0200
commit8033850ab81ca0639489636bb8760d93900d4a80 (patch)
tree94c2df630a4c6fce97f6192a63a663a25f43266c /src/gun_http.erl
parente740356b5881c39a95715d6081689802edf469a0 (diff)
downloadgun-8033850ab81ca0639489636bb8760d93900d4a80.tar.gz
gun-8033850ab81ca0639489636bb8760d93900d4a80.tar.bz2
gun-8033850ab81ca0639489636bb8760d93900d4a80.zip
Initial success for h2 CONNECT -> https CONNECT -> https
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r--src/gun_http.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 490f025..064bf04 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -378,6 +378,7 @@ handle_inform(Rest, State=#http_state{
{_, Upgrade0} = lists:keyfind(<<"upgrade">>, 1, Headers),
Upgrade = cow_http_hd:parse_upgrade(Upgrade0),
ReplyTo ! {gun_upgrade, self(), stream_ref(State, StreamRef), Upgrade, Headers},
+ %% @todo We probably need to add_stream_ref?
{handle_ret({switch_protocol, raw, ReplyTo}, State), EvHandlerState0}
catch _:_ ->
%% When the Upgrade header is missing or invalid we treat
@@ -781,7 +782,7 @@ stream_info(#http_state{streams=Streams}, StreamRef) ->
case lists:keyfind(StreamRef, #stream.ref, Streams) of
#stream{reply_to=ReplyTo, is_alive=IsAlive} ->
{ok, #{
- ref => StreamRef,
+ ref => StreamRef, %% @todo Wrong stream_ref? base_stream_ref it?
reply_to => ReplyTo,
state => case IsAlive of
true -> running;