mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Merge branch 'fix-tests' of git://github.com/fishcakez/cowboy
This commit is contained in:
commit
12bd1afeed
1 changed files with 5 additions and 3 deletions
|
@ -499,7 +499,8 @@ The document has moved
|
||||||
_ = [{Status, Packet} = begin
|
_ = [{Status, Packet} = begin
|
||||||
Ret = quick_raw(Packet, Config),
|
Ret = quick_raw(Packet, Config),
|
||||||
{Ret, Packet}
|
{Ret, Packet}
|
||||||
end || {Status, Packet} <- Tests].
|
end || {Status, Packet} <- Tests],
|
||||||
|
ok.
|
||||||
|
|
||||||
check_status(Config) ->
|
check_status(Config) ->
|
||||||
Tests = [
|
Tests = [
|
||||||
|
@ -539,7 +540,7 @@ chunked_response(Config) ->
|
||||||
echo_body(Config) ->
|
echo_body(Config) ->
|
||||||
Client = ?config(client, Config),
|
Client = ?config(client, Config),
|
||||||
{ok, [{mtu, MTU}]} = inet:ifget("lo", [mtu]),
|
{ok, [{mtu, MTU}]} = inet:ifget("lo", [mtu]),
|
||||||
[begin
|
_ = [begin
|
||||||
Body = list_to_binary(lists:duplicate(Size, $a)),
|
Body = list_to_binary(lists:duplicate(Size, $a)),
|
||||||
{ok, Client2} = cowboy_client:request(<<"POST">>,
|
{ok, Client2} = cowboy_client:request(<<"POST">>,
|
||||||
build_url("/echo/body", Config),
|
build_url("/echo/body", Config),
|
||||||
|
@ -547,7 +548,8 @@ echo_body(Config) ->
|
||||||
Body, Client),
|
Body, Client),
|
||||||
{ok, 200, _, Client3} = cowboy_client:response(Client2),
|
{ok, 200, _, Client3} = cowboy_client:response(Client2),
|
||||||
{ok, Body, _} = cowboy_client:response_body(Client3)
|
{ok, Body, _} = cowboy_client:response_body(Client3)
|
||||||
end || Size <- lists:seq(MTU - 500, MTU)].
|
end || Size <- lists:seq(MTU - 500, MTU)],
|
||||||
|
ok.
|
||||||
|
|
||||||
%% Check if sending request whose size is bigger than 1000000 bytes causes 413
|
%% Check if sending request whose size is bigger than 1000000 bytes causes 413
|
||||||
echo_body_max_length(Config) ->
|
echo_body_max_length(Config) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue