aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r--src/gun_http.erl11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 85fd2c4..44575bf 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -313,14 +313,9 @@ handle_head(Data, State=#http_state{version=ClientVersion, content_handlers=Hand
{[{origin, <<"https">>, NewHost, NewPort, connect},
{tls_handshake, HandshakeEvent, Protocols}], EvHandlerState1};
_ ->
- case Protocols of
- [http] ->
- {[{state, State2},
- {origin, <<"http">>, NewHost, NewPort, connect}], EvHandlerState1};
- [http2] ->
- {[{origin, <<"http">>, NewHost, NewPort, connect},
- {switch_protocol, http2}], EvHandlerState1}
- end
+ [Protocol] = Protocols,
+ {[{origin, <<"http">>, NewHost, NewPort, connect},
+ {switch_protocol, Protocol}], EvHandlerState1}
end;
{_, _} when Status >= 100, Status =< 199 ->
ReplyTo ! {gun_inform, self(), stream_ref(StreamRef), Status, Headers},