diff options
author | Martin Rehfeld <[email protected]> | 2015-01-30 13:43:55 +0000 |
---|---|---|
committer | Martin Rehfeld <[email protected]> | 2015-01-30 13:43:55 +0000 |
commit | 07ef3c32d71cd52ea46d0469ff8c75d312c2d32e (patch) | |
tree | eb615c6a202c83c1e7a2feee791229285ea98bea /src/cowboy_http.erl | |
parent | 3d9078018d7f0a83a359b70c698d35e35fbb94f9 (diff) | |
download | cowboy-07ef3c32d71cd52ea46d0469ff8c75d312c2d32e.tar.gz cowboy-07ef3c32d71cd52ea46d0469ff8c75d312c2d32e.tar.bz2 cowboy-07ef3c32d71cd52ea46d0469ff8c75d312c2d32e.zip |
Reply with 400 on if*-match parsing crash
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r-- | src/cowboy_http.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl index 1cf73bf..d616f73 100644 --- a/src/cowboy_http.erl +++ b/src/cowboy_http.erl @@ -668,7 +668,9 @@ token(<< C, Rest/binary >>, Fun, Case, Acc) -> -spec quoted_string(binary(), fun()) -> any(). quoted_string(<< $", Rest/binary >>, Fun) -> - quoted_string(Rest, Fun, <<>>). + quoted_string(Rest, Fun, <<>>); +quoted_string(_, _Fun) -> + {error, badarg}. -spec quoted_string(binary(), fun(), binary()) -> any(). quoted_string(<<>>, _Fun, _Acc) -> |