diff options
author | Loïc Hoguin <[email protected]> | 2019-10-04 13:32:35 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-10-04 13:32:35 +0200 |
commit | 5ffb4f98e0a8be09675ca508c269b71654294d6a (patch) | |
tree | 23a61a995736d313aa719c9b36033749991207b1 /test/handlers | |
parent | 1a9e62ae2a3b4e39c10c87b5841b460ed81124a9 (diff) | |
download | cowboy-5ffb4f98e0a8be09675ca508c269b71654294d6a.tar.gz cowboy-5ffb4f98e0a8be09675ca508c269b71654294d6a.tar.bz2 cowboy-5ffb4f98e0a8be09675ca508c269b71654294d6a.zip |
Make cowboy_compress_h add vary: accept-encoding
Diffstat (limited to 'test/handlers')
-rw-r--r-- | test/handlers/compress_h.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/handlers/compress_h.erl b/test/handlers/compress_h.erl index 32830d9..76c2db1 100644 --- a/test/handlers/compress_h.erl +++ b/test/handlers/compress_h.erl @@ -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">> -> |