mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Improve the limit_requests_keepalive test
We now check that the connection gets closed.
This commit is contained in:
parent
6c04875111
commit
07d454bdb7
1 changed files with 2 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
-import(ct_helper, [doc/1]).
|
-import(ct_helper, [doc/1]).
|
||||||
-import(cowboy_test, [gun_open/1]).
|
-import(cowboy_test, [gun_open/1]).
|
||||||
|
-import(cowboy_test, [gun_down/1]).
|
||||||
-import(cowboy_test, [raw_open/1]).
|
-import(cowboy_test, [raw_open/1]).
|
||||||
-import(cowboy_test, [raw_send/2]).
|
-import(cowboy_test, [raw_send/2]).
|
||||||
-import(cowboy_test, [raw_recv_head/1]).
|
-import(cowboy_test, [raw_recv_head/1]).
|
||||||
|
@ -1428,7 +1429,7 @@ limit_requests_keepalive(Config) ->
|
||||||
{response, nofin, 200, RespHeaders} = gun:await(ConnPid, Ref),
|
{response, nofin, 200, RespHeaders} = gun:await(ConnPid, Ref),
|
||||||
{ok, <<"Hello world!">>} = gun:await_body(ConnPid, Ref),
|
{ok, <<"Hello world!">>} = gun:await_body(ConnPid, Ref),
|
||||||
{_, <<"close">>} = lists:keyfind(<<"connection">>, 1, RespHeaders),
|
{_, <<"close">>} = lists:keyfind(<<"connection">>, 1, RespHeaders),
|
||||||
ok.
|
gun_down(ConnPid).
|
||||||
|
|
||||||
%skip_request_body_by_closing_connection(Config) ->
|
%skip_request_body_by_closing_connection(Config) ->
|
||||||
%%A server that doesn't want to read the entire body of a message
|
%%A server that doesn't want to read the entire body of a message
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue