diff options
author | Loïc Hoguin <[email protected]> | 2019-10-03 11:56:39 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-10-03 11:56:57 +0200 |
commit | 57badc9082f4052f15bc3a3a432b1cfcee03c745 (patch) | |
tree | dd135ef3fe4fd3e55f7a249abb82d79f179b4f14 /test/handlers | |
parent | 99df823cc32fed641c15722e22e8d6a5969a77c6 (diff) | |
download | cowboy-57badc9082f4052f15bc3a3a432b1cfcee03c745.tar.gz cowboy-57badc9082f4052f15bc3a3a432b1cfcee03c745.tar.bz2 cowboy-57badc9082f4052f15bc3a3a432b1cfcee03c745.zip |
Add HTTP/2 tests with responses with HTTP/1.1 specific headers
Diffstat (limited to 'test/handlers')
-rw-r--r-- | test/handlers/resp_h.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/handlers/resp_h.erl b/test/handlers/resp_h.erl index bc76d56..5bd4c72 100644 --- a/test/handlers/resp_h.erl +++ b/test/handlers/resp_h.erl @@ -39,6 +39,16 @@ do(<<"set_resp_headers">>, Req0, Opts) -> <<"content-encoding">> => <<"compress">> }, Req0), {ok, cowboy_req:reply(200, #{}, "OK", Req), Opts}; +do(<<"set_resp_headers_http11">>, Req0, Opts) -> + Req = cowboy_req:set_resp_headers(#{ + <<"connection">> => <<"custom-header, close">>, + <<"custom-header">> => <<"value">>, + <<"keep-alive">> => <<"timeout=5, max=1000">>, + <<"proxy-connection">> => <<"close">>, + <<"transfer-encoding">> => <<"chunked">>, + <<"upgrade">> => <<"HTTP/1.1">> + }, Req0), + {ok, cowboy_req:reply(200, #{}, "OK", Req), Opts}; do(<<"resp_header_defined">>, Req0, Opts) -> Req1 = cowboy_req:set_resp_header(<<"content-type">>, <<"text/plain">>, Req0), <<"text/plain">> = cowboy_req:resp_header(<<"content-type">>, Req1), |