diff options
author | geeksilva97 <[email protected]> | 2024-01-18 20:50:27 -0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2024-01-23 14:11:29 +0100 |
commit | 08c2be058a1c376fcb80465473b53085c14f88f5 (patch) | |
tree | 81ffac7199ba181f801ce43bf738df7f52b0f428 /test/handlers/echo_h.erl | |
parent | 3e145af9b9e8d61ca042d1f94287d16b5ac155dd (diff) | |
download | cowboy-08c2be058a1c376fcb80465473b53085c14f88f5.tar.gz cowboy-08c2be058a1c376fcb80465473b53085c14f88f5.tar.bz2 cowboy-08c2be058a1c376fcb80465473b53085c14f88f5.zip |
Fix match_qs with constraints when key is not present
Original fix by Ali Farhadi <[email protected]>.
Diffstat (limited to 'test/handlers/echo_h.erl')
-rw-r--r-- | test/handlers/echo_h.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/handlers/echo_h.erl b/test/handlers/echo_h.erl index f50bc79..d04d531 100644 --- a/test/handlers/echo_h.erl +++ b/test/handlers/echo_h.erl @@ -86,6 +86,7 @@ echo(<<"match">>, Req, Opts) -> Fields = [binary_to_atom(F, latin1) || F <- Fields0], Value = case Type of <<"qs">> -> cowboy_req:match_qs(Fields, Req); + <<"qs_with_constraints">> -> cowboy_req:match_qs([{id, integer}], Req); <<"cookies">> -> cowboy_req:match_cookies(Fields, Req); <<"body_qs">> -> %% Note that the Req should not be discarded but for the |