0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Merge branch 'fix-1' of https://github.com/martinrehfeld/cowboy into 1.0.x

This commit is contained in:
Loïc Hoguin 2015-05-06 11:33:27 +03:00
commit 4fb2aacc88
2 changed files with 9 additions and 3 deletions

View file

@ -668,7 +668,9 @@ token(<< C, Rest/binary >>, Fun, Case, Acc) ->
-spec quoted_string(binary(), fun()) -> any(). -spec quoted_string(binary(), fun()) -> any().
quoted_string(<< $", Rest/binary >>, Fun) -> 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(). -spec quoted_string(binary(), fun(), binary()) -> any().
quoted_string(<<>>, _Fun, _Acc) -> quoted_string(<<>>, _Fun, _Acc) ->

View file

@ -529,7 +529,9 @@ if_match_exists(Req, State) ->
{ok, '*', Req2} -> {ok, '*', Req2} ->
if_unmodified_since_exists(Req2, State2); if_unmodified_since_exists(Req2, State2);
{ok, ETagsList, Req2} -> {ok, ETagsList, Req2} ->
if_match(Req2, State2, ETagsList) if_match(Req2, State2, ETagsList);
{error, badarg} ->
respond(Req, State2, 400)
end. end.
if_match(Req, State, EtagsList) -> if_match(Req, State, EtagsList) ->
@ -579,7 +581,9 @@ if_none_match_exists(Req, State) ->
{ok, '*', Req2} -> {ok, '*', Req2} ->
precondition_is_head_get(Req2, State); precondition_is_head_get(Req2, State);
{ok, EtagsList, Req2} -> {ok, EtagsList, Req2} ->
if_none_match(Req2, State, EtagsList) if_none_match(Req2, State, EtagsList);
{error, badarg} ->
respond(Req, State, 400)
end. end.
if_none_match(Req, State, EtagsList) -> if_none_match(Req, State, EtagsList) ->