aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-02-27 16:27:34 +0100
committerLoïc Hoguin <[email protected]>2020-02-27 16:34:29 +0100
commitdb12dd680f6539f199308f0783309ffefa5f3b06 (patch)
tree0489c06966eb61dd65b92e11f064973f78d9b197 /test
parentf4e846e534667100a64ce142cb93b8974438fbe3 (diff)
downloadgun-db12dd680f6539f199308f0783309ffefa5f3b06.tar.gz
gun-db12dd680f6539f199308f0783309ffefa5f3b06.tar.bz2
gun-db12dd680f6539f199308f0783309ffefa5f3b06.zip
Use specific error when HTTP/2 receives HTTP/1 response
Also fix a build issue introduced in cherry-pick.
Diffstat (limited to 'test')
-rw-r--r--test/rfc7540_SUITE.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/rfc7540_SUITE.erl b/test/rfc7540_SUITE.erl
index 43d2e52..0031b19 100644
--- a/test/rfc7540_SUITE.erl
+++ b/test/rfc7540_SUITE.erl
@@ -118,7 +118,7 @@ prior_knowledge_preface_http1(_) ->
{ok, http2} = gun:await_up(ConnPid),
receive
{gun_down, ConnPid, http2, {error, {connection_error, protocol_error,
- 'Invalid connection preface received. (RFC7540 3.5)'}}, [], []} ->
+ 'Invalid connection preface received. Appears to be an HTTP/1 response? (RFC7540 3.5)'}}, [], []} ->
gun:close(ConnPid);
Msg ->
error({unexpected_msg, Msg})
@@ -144,7 +144,7 @@ prior_knowledge_preface_http1_await(_) ->
{ok, ConnPid} = gun:open("localhost", Port, #{protocols => [http2], retry => 0}),
{ok, http2} = gun:await_up(ConnPid),
{error, {shutdown, {error, {connection_error, protocol_error,
- 'Invalid connection preface received. (RFC7540 3.5)'}}}}
+ 'Invalid connection preface received. Appears to be an HTTP/1 response? (RFC7540 3.5)'}}}}
= gun:await(ConnPid, make_ref()),
gun:close(ConnPid).