aboutsummaryrefslogtreecommitdiffstats
path: root/test/rfc7230_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/rfc7230_SUITE.erl')
-rw-r--r--test/rfc7230_SUITE.erl21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/rfc7230_SUITE.erl b/test/rfc7230_SUITE.erl
index d42a454..17ff452 100644
--- a/test/rfc7230_SUITE.erl
+++ b/test/rfc7230_SUITE.erl
@@ -1593,15 +1593,18 @@ empty_host(Config0) ->
Config = cowboy_test:init_http(?FUNCTION_NAME, #{
env => #{dispatch => cowboy_router:compile(Routes)}
}, Config0),
- #{code := 200, body := <<>>} = do_raw(Config, [
- "GET /echo/host HTTP/1.1\r\n"
- "Host:\r\n"
- "\r\n"]),
- #{code := 200, body := <<>>} = do_raw(Config, [
- "GET /echo/host HTTP/1.1\r\n"
- "Host: \r\n"
- "\r\n"]),
- cowboy:stop_listener(?FUNCTION_NAME).
+ try
+ #{code := 200, body := <<>>} = do_raw(Config, [
+ "GET /echo/host HTTP/1.1\r\n"
+ "Host:\r\n"
+ "\r\n"]),
+ #{code := 200, body := <<>>} = do_raw(Config, [
+ "GET /echo/host HTTP/1.1\r\n"
+ "Host: \r\n"
+ "\r\n"])
+ after
+ cowboy:stop_listener(?FUNCTION_NAME)
+ end.
%% The effective request URI can be rebuilt by concatenating scheme,
%% "://", authority, path and query components. (RFC7230 5.5)