From b28950d5e701055f536f66c70b581c3cf806f3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 6 Nov 2020 11:52:03 +0100 Subject: Fix IsFin mismatch in HTTP/2 CONNECT response The response ends when the tunnel is established, even if the stream itself does not. The data coming in on the stream after is not part of the response. This makes both HTTP/1.1 and HTTP/2 send 'fin' to successful CONNECT responses. --- src/gun_http2.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gun_http2.erl b/src/gun_http2.erl index 037c193..8f0632b 100644 --- a/src/gun_http2.erl +++ b/src/gun_http2.erl @@ -510,7 +510,7 @@ headers_frame_connect(State=#http2_state{transport=Transport, opts=Opts, tunnel_ origin_host => DestHost, origin_port => DestPort }, - ReplyTo ! {gun_response, self(), RealStreamRef, nofin, Status, Headers}, + ReplyTo ! {gun_response, self(), RealStreamRef, fin, Status, Headers}, EvHandlerState1 = EvHandler:response_headers(#{ stream_ref => RealStreamRef, reply_to => ReplyTo, -- cgit v1.2.3