aboutsummaryrefslogtreecommitdiffstats
path: root/test/rfc6265bis_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-11-06 11:52:03 +0100
committerLoïc Hoguin <[email protected]>2020-11-06 11:52:03 +0100
commitb28950d5e701055f536f66c70b581c3cf806f3dd (patch)
tree1d8e53ab3632d8333480cb29ca550454b0207f68 /test/rfc6265bis_SUITE.erl
parentd5f1a47e9ab758a51b23440eb72a0251527f3f7b (diff)
downloadgun-b28950d5e701055f536f66c70b581c3cf806f3dd.tar.gz
gun-b28950d5e701055f536f66c70b581c3cf806f3dd.tar.bz2
gun-b28950d5e701055f536f66c70b581c3cf806f3dd.zip
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.
Diffstat (limited to 'test/rfc6265bis_SUITE.erl')
-rw-r--r--test/rfc6265bis_SUITE.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/rfc6265bis_SUITE.erl b/test/rfc6265bis_SUITE.erl
index b4b443d..4301fc3 100644
--- a/test/rfc6265bis_SUITE.erl
+++ b/test/rfc6265bis_SUITE.erl
@@ -193,8 +193,7 @@ set_cookie_connect_tcp(Config) ->
transport => Transport,
protocols => [Protocol]
}),
- %% @todo _IsFin is 'fin' for HTTP and 'nofin' for HTTP/2...
- {response, _IsFin, 200, _} = gun:await(ConnPid, StreamRef1),
+ {response, fin, 200, _} = gun:await(ConnPid, StreamRef1),
{up, Protocol} = gun:await(ConnPid, StreamRef1),
StreamRef2 = gun:get(ConnPid, "/cookie-set?prefix", #{
<<"please-set-cookie">> => <<"a=b">>
@@ -226,8 +225,7 @@ set_cookie_connect_tls(Config) ->
transport => Transport,
protocols => [Protocol]
}),
- %% @todo _IsFin is 'fin' for HTTP and 'nofin' for HTTP/2...
- {response, _IsFin, 200, _} = gun:await(ConnPid, StreamRef1),
+ {response, fin, 200, _} = gun:await(ConnPid, StreamRef1),
{up, Protocol} = gun:await(ConnPid, StreamRef1),
StreamRef2 = gun:get(ConnPid, "/cookie-set?prefix", #{
<<"please-set-cookie">> => <<"a=b">>