diff options
author | Loïc Hoguin <[email protected]> | 2017-12-07 22:12:34 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-12-07 22:33:52 +0100 |
commit | b000d53855592c5470a8c2f2dcebc4915ec4d4d1 (patch) | |
tree | 355923b7751c5fe943de5f028b1e96cda90e6604 /test/handlers | |
parent | c2b813684edca59d8b77c33f2632ef243bed7449 (diff) | |
download | cowboy-b000d53855592c5470a8c2f2dcebc4915ec4d4d1.tar.gz cowboy-b000d53855592c5470a8c2f2dcebc4915ec4d4d1.tar.bz2 cowboy-b000d53855592c5470a8c2f2dcebc4915ec4d4d1.zip |
Add more rfc7231 tests and a new max_skip_body_length option
The option controls how much body we accept to skip for HTTP/1.1
connections when the user code did not consume the body fully.
It defaults to 1MB.
Diffstat (limited to 'test/handlers')
-rw-r--r-- | test/handlers/echo_h.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/handlers/echo_h.erl b/test/handlers/echo_h.erl index a2ab31b..a116442 100644 --- a/test/handlers/echo_h.erl +++ b/test/handlers/echo_h.erl @@ -21,6 +21,9 @@ echo(<<"read_body">>, Req0, Opts) -> <<"/100-continue", _/bits>> -> cowboy_req:inform(100, Req0), cowboy_req:read_body(Req0); + <<"/delay", _/bits>> -> + timer:sleep(500), + cowboy_req:read_body(Req0); <<"/full", _/bits>> -> read_body(Req0, <<>>); <<"/length", _/bits>> -> {_, _, Req1} = read_body(Req0, <<>>), |