From 5ffb4f98e0a8be09675ca508c269b71654294d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 4 Oct 2019 13:32:35 +0200 Subject: Make cowboy_compress_h add vary: accept-encoding --- test/handlers/compress_h.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/handlers') 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">> -> -- cgit v1.2.3