Browse Source

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

Loïc Hoguin 13 years ago
parent
commit
725e272996
1 changed files with 0 additions and 7 deletions
  1. 0 7
      src/cowboy_http.erl

+ 0 - 7
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,