diff options
Diffstat (limited to 'src/gun_http2.erl')
-rw-r--r-- | src/gun_http2.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gun_http2.erl b/src/gun_http2.erl index 9c8e094..2778b4f 100644 --- a/src/gun_http2.erl +++ b/src/gun_http2.erl @@ -1256,16 +1256,18 @@ stream_info(State, StreamRef) when is_reference(StreamRef) -> info=#{origin_host := OriginHost, origin_port := OriginPort}, protocol=Proto, protocol_state=ProtoState}} -> Transport = maps:get(transport, Destination, tcp), + Protocol = Proto:tunneled_name(ProtoState, true), {ok, #{ ref => StreamRef, reply_to => ReplyTo, state => running, tunnel => #{ transport => Transport, - protocol => Proto:tunneled_name(ProtoState, true), - origin_scheme => case Transport of - tcp -> <<"http">>; - tls -> <<"https">> + protocol => Protocol, + origin_scheme => case {Transport, Protocol} of + {_, raw} -> undefined; + {tcp, _} -> <<"http">>; + {tls, _} -> <<"https">> end, origin_host => OriginHost, origin_port => OriginPort |