From 725e2729966aff18da1a84ae9a1fbd2506afc03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 26 Oct 2011 19:41:49 +0200 Subject: cowboy_http:media_range/2 should expect to not have whitespace before it --- src/cowboy_http.erl | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/cowboy_http.erl') diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl index 5036d63..ee8902a 100644 --- a/src/cowboy_http.erl +++ b/src/cowboy_http.erl @@ -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, -- cgit v1.2.3