aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http.erl
diff options
context:
space:
mode:
authorMartin Rehfeld <[email protected]>2015-01-30 13:43:55 +0000
committerMartin Rehfeld <[email protected]>2015-01-30 13:43:55 +0000
commit07ef3c32d71cd52ea46d0469ff8c75d312c2d32e (patch)
treeeb615c6a202c83c1e7a2feee791229285ea98bea /src/cowboy_http.erl
parent3d9078018d7f0a83a359b70c698d35e35fbb94f9 (diff)
downloadcowboy-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.erl4
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) ->