0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Add a test confirming push requests have no body

This commit is contained in:
Loïc Hoguin 2020-02-05 18:06:00 +01:00
parent 752297b153
commit 47ecfd7318
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
2 changed files with 14 additions and 0 deletions

View file

@ -379,6 +379,8 @@ do(<<"stream_trailers">>, Req0, Opts) ->
end;
do(<<"push">>, Req, Opts) ->
case cowboy_req:binding(arg, Req) of
<<"read_body">> ->
cowboy_req:push("/echo/read_body", #{}, Req, #{});
<<"method">> ->
cowboy_req:push("/static/style.css", #{<<"accept">> => <<"text/css">>}, Req,
#{method => <<"HEAD">>});