mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix match_qs with constraints when key is not present
Original fix by Ali Farhadi <a.farhadi@gmail.com>.
This commit is contained in:
parent
3e145af9b9
commit
08c2be058a
3 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue