mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Remove another test from the old http suite
This commit is contained in:
parent
f6539a9a68
commit
d7761b5259
3 changed files with 11 additions and 8 deletions
|
@ -195,6 +195,12 @@ do(<<"stream_body">>, Req0, Opts) ->
|
||||||
cowboy_req:stream_body(<<"Hello world!">>, nofin, Req),
|
cowboy_req:stream_body(<<"Hello world!">>, nofin, Req),
|
||||||
cowboy_req:stream_body(<<>>, fin, Req),
|
cowboy_req:stream_body(<<>>, fin, Req),
|
||||||
{ok, Req, Opts};
|
{ok, Req, Opts};
|
||||||
|
<<"multiple">> ->
|
||||||
|
Req = cowboy_req:stream_reply(200, Req0),
|
||||||
|
cowboy_req:stream_body(<<"Hello ">>, nofin, Req),
|
||||||
|
cowboy_req:stream_body(<<"world">>, nofin, Req),
|
||||||
|
cowboy_req:stream_body(<<"!">>, fin, Req),
|
||||||
|
{ok, Req, Opts};
|
||||||
<<"nofin">> ->
|
<<"nofin">> ->
|
||||||
Req = cowboy_req:stream_reply(200, Req0),
|
Req = cowboy_req:stream_reply(200, Req0),
|
||||||
cowboy_req:stream_body(<<"Hello world!">>, nofin, Req),
|
cowboy_req:stream_body(<<"Hello world!">>, nofin, Req),
|
||||||
|
|
|
@ -211,14 +211,6 @@ check_status(Config) ->
|
||||||
{Ret, URL}
|
{Ret, URL}
|
||||||
end || {Status, URL} <- Tests].
|
end || {Status, URL} <- Tests].
|
||||||
|
|
||||||
chunked_response(Config) ->
|
|
||||||
ConnPid = gun_open(Config),
|
|
||||||
Ref = gun:get(ConnPid, "/chunked_response"),
|
|
||||||
{response, nofin, 200, Headers} = gun:await(ConnPid, Ref),
|
|
||||||
true = lists:keymember(<<"transfer-encoding">>, 1, Headers),
|
|
||||||
{ok, <<"chunked_handler\r\nworks fine!">>} = gun:await_body(ConnPid, Ref),
|
|
||||||
ok.
|
|
||||||
|
|
||||||
%% Check if sending requests whose size is around the MTU breaks something.
|
%% Check if sending requests whose size is around the MTU breaks something.
|
||||||
echo_body(Config) ->
|
echo_body(Config) ->
|
||||||
MTU = ct_helper:get_loopback_mtu(),
|
MTU = ct_helper:get_loopback_mtu(),
|
||||||
|
|
|
@ -827,6 +827,11 @@ stream_reply3(Config) ->
|
||||||
{500, _, _} = do_get("/resp/stream_reply3/error", Config),
|
{500, _, _} = do_get("/resp/stream_reply3/error", Config),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
stream_body_multiple(Config) ->
|
||||||
|
doc("Streamed body via multiple calls."),
|
||||||
|
{200, _, <<"Hello world!">>} = do_get("/resp/stream_body/multiple", Config),
|
||||||
|
ok.
|
||||||
|
|
||||||
stream_body_fin0(Config) ->
|
stream_body_fin0(Config) ->
|
||||||
doc("Streamed body with last chunk of size 0."),
|
doc("Streamed body with last chunk of size 0."),
|
||||||
{200, _, <<"Hello world!">>} = do_get("/resp/stream_body/fin0", Config),
|
{200, _, <<"Hello world!">>} = do_get("/resp/stream_body/fin0", Config),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue