mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 12:40:25 +00:00
stream trailers test
This commit is contained in:
parent
a3e402db1f
commit
31b0aa024e
2 changed files with 15 additions and 2 deletions
|
@ -419,6 +419,16 @@ do(<<"stream_trailers">>, Req0, Opts) ->
|
|||
<<"grpc-status">> => <<"0">>
|
||||
}, Req),
|
||||
{ok, Req, Opts};
|
||||
<<"set_cookie">> ->
|
||||
ct_helper:ignore(cowboy_req, stream_trailers, 2),
|
||||
Req = cowboy_req:stream_reply(200, #{
|
||||
<<"trailer">> => <<"grpc-status">>
|
||||
}, Req0),
|
||||
cowboy_req:stream_body(<<"Testing dang cookies">>, nofin, Req),
|
||||
cowboy_req:stream_trailers(#{
|
||||
<<"set-cookie">> => <<"name=hello">>
|
||||
}, Req),
|
||||
{ok, Req, Opts};
|
||||
_ ->
|
||||
Req = cowboy_req:stream_reply(200, #{
|
||||
<<"trailer">> => <<"grpc-status">>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue