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

Make cowboy_compress_h add vary: accept-encoding

This commit is contained in:
Loïc Hoguin 2019-10-04 13:32:35 +02:00
parent 1a9e62ae2a
commit 5ffb4f98e0
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
3 changed files with 79 additions and 4 deletions

View file

@ -11,6 +11,9 @@ init(Req0, State=reply) ->
cowboy_req:reply(200, #{}, lists:duplicate(100, $a), Req0);
<<"large">> ->
cowboy_req:reply(200, #{}, lists:duplicate(100000, $a), Req0);
<<"vary">> ->
Vary = cowboy_req:header(<<"x-test-vary">>, Req0),
cowboy_req:reply(200, #{<<"vary">> => Vary}, lists:duplicate(100000, $a), Req0);
<<"over-threshold">> ->
cowboy_req:reply(200, #{}, lists:duplicate(200, $a), Req0);
<<"content-encoding">> ->