0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00

cowboy_http:media_range/2 should expect to not have whitespace before it

This commit is contained in:
Loïc Hoguin 2011-10-26 19:41:49 +02:00
parent 20204fd33e
commit 725e272996

View file

@ -67,13 +67,6 @@ list(Data, Fun, Acc) ->
%% @doc Parse a media range.
-spec media_range(binary(), fun()) -> any().
media_range(Data, Fun) ->
whitespace(Data,
fun (<<>>) -> {error, badarg};
(Rest) -> media_range_type(Rest, Fun)
end).
-spec media_range_type(binary(), fun()) -> any().
media_range_type(Data, Fun) ->
token_ci(Data,
fun (_Rest, <<>>) -> {error, badarg};
(Rest, Type) -> whitespace(Rest,