From b000d53855592c5470a8c2f2dcebc4915ec4d4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 7 Dec 2017 22:12:34 +0100 Subject: 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. --- test/handlers/echo_h.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/handlers') 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, <<>>), -- cgit v1.2.3