aboutsummaryrefslogtreecommitdiffstats
path: root/test/req_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-10-02 19:12:05 +0200
committerLoïc Hoguin <[email protected]>2019-10-02 19:12:05 +0200
commit20660d7566b63977e80f694724fee890d875ec1b (patch)
tree38cb0e24818b1c196f94636319400158c1295df2 /test/req_SUITE.erl
parent8f6ee9c1868ebc7bf31fb4846114919e164e0cf3 (diff)
downloadcowboy-20660d7566b63977e80f694724fee890d875ec1b.tar.gz
cowboy-20660d7566b63977e80f694724fee890d875ec1b.tar.bz2
cowboy-20660d7566b63977e80f694724fee890d875ec1b.zip
Ensure we can read the request body from any process
Diffstat (limited to 'test/req_SUITE.erl')
-rw-r--r--test/req_SUITE.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl
index eafabfe..72cc0ed 100644
--- a/test/req_SUITE.erl
+++ b/test/req_SUITE.erl
@@ -57,6 +57,7 @@ init_dispatch(Config) ->
{"/opts/:key/timeout", echo_h, #{timeout => 1000, crash => true}},
{"/100-continue/:key", echo_h, []},
{"/full/:key", echo_h, []},
+ {"/spawn/:key", echo_h, []},
{"/no/:key", echo_h, []},
{"/direct/:key/[...]", echo_h, []},
{"/:key/[...]", echo_h, []}
@@ -488,6 +489,11 @@ do_read_body_timeout(Path, Body, Config) ->
{response, _, 500, _} = gun:await(ConnPid, Ref),
gun:close(ConnPid).
+read_body_spawn(Config) ->
+ doc("Confirm we can use cowboy_req:read_body/1,2 from another process."),
+ <<"hello world!">> = do_body("POST", "/spawn/read_body", [], "hello world!", Config),
+ ok.
+
read_body_expect_100_continue(Config) ->
doc("Request body with a 100-continue expect header."),
do_read_body_expect_100_continue("/read_body", Config).