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

Remove the trailer header from HTTP/1.1 response if no TE

This commit is contained in:
Loïc Hoguin 2018-05-18 18:38:38 +02:00
parent 5229d790fb
commit 5d1cf36358
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
2 changed files with 23 additions and 20 deletions

View file

@ -1912,7 +1912,7 @@ te_trailers(Config) ->
#{code := 200, headers := RespHeaders} = do_raw(Config, [
"GET /resp/stream_trailers HTTP/1.1\r\n"
"Host: localhost\r\n"
"TE: trailer\r\n"
"TE: trailers\r\n"
"\r\n"]),
{_, <<"chunked">>} = lists:keyfind(<<"transfer-encoding">>, 1, RespHeaders),
{_, <<"grpc-status">>} = lists:keyfind(<<"trailer">>, 1, RespHeaders),