mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Add the idle_timeout HTTP/1.1 protocol option
This fixes the connection being dropped because of request_timeout despite there being some active streams.
This commit is contained in:
parent
73b4eb94ff
commit
95d2855f62
4 changed files with 57 additions and 35 deletions
|
@ -83,9 +83,9 @@ loop_body(Config) ->
|
|||
{response, fin, 200, _} = gun:await(ConnPid, Ref),
|
||||
ok.
|
||||
|
||||
loop_timeout(Config) ->
|
||||
doc("Ensure that the loop handler timeout results in a 204 response."),
|
||||
loop_request_timeout(Config) ->
|
||||
doc("Ensure that the request_timeout isn't applied when a request is ongoing."),
|
||||
ConnPid = gun_open(Config),
|
||||
Ref = gun:get(ConnPid, "/loop_timeout", [{<<"accept-encoding">>, <<"gzip">>}]),
|
||||
{response, fin, 204, _} = gun:await(ConnPid, Ref),
|
||||
{response, nofin, 200, _} = gun:await(ConnPid, Ref, 10000),
|
||||
ok.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue