diff options
author | Loïc Hoguin <[email protected]> | 2020-07-17 14:05:43 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-09-21 15:51:56 +0200 |
commit | d7481d5f593f48327d16c29b48a74e49c7581e0a (patch) | |
tree | 044bd6efdf33a7d1f2cafe889af5626b2c2c0d97 /src/gun_http2.erl | |
parent | 510d49d8ef0a46e90374c3230f28b5354115293f (diff) | |
download | gun-d7481d5f593f48327d16c29b48a74e49c7581e0a.tar.gz gun-d7481d5f593f48327d16c29b48a74e49c7581e0a.tar.bz2 gun-d7481d5f593f48327d16c29b48a74e49c7581e0a.zip |
Improve HTTP/2 CONNECT to non-HTTP origin
Now has a proper StreamRef given to it by the CONNECT stream.
Diffstat (limited to 'src/gun_http2.erl')
-rw-r--r-- | src/gun_http2.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gun_http2.erl b/src/gun_http2.erl index 0dad3d9..e1a9873 100644 --- a/src/gun_http2.erl +++ b/src/gun_http2.erl @@ -407,7 +407,9 @@ headers_frame(State0=#http2_state{content_handlers=Handlers0, commands_queue=Com stream_ref => StreamRef }, OriginTransport = gun_tcp_proxy, - {_, ProtoState} = Protocol:init(ReplyTo, OriginSocket, OriginTransport, ProtoOpts), + {_, ProtoState} = Protocol:init(ReplyTo, OriginSocket, OriginTransport, + %% @todo We are giving the wrong StreamRef we need to give the list (if any). + ProtoOpts#{stream_ref => StreamRef}), %% @todo EvHandlerState = EvHandler:protocol_changed(#{protocol => Protocol:name()}, EvHandlerState0), %% @todo What about keepalive? {store_stream(State, Stream#stream{tunnel={Protocol, ProtoState, |