Browse Source

Use cow_http_hd:parse_content_length/1 where applicable

Loïc Hoguin 11 years ago
parent
commit
dff1b5715c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/cowboy_req.erl

+ 1 - 1
src/cowboy_req.erl

@@ -427,7 +427,7 @@ parse_header(Name = <<"authorization">>, Req, Default) ->
 			cowboy_http:token_ci(Value, fun cowboy_http:authorization/2)
 			cowboy_http:token_ci(Value, fun cowboy_http:authorization/2)
 		end);
 		end);
 parse_header(Name = <<"content-length">>, Req, Default) ->
 parse_header(Name = <<"content-length">>, Req, Default) ->
-	parse_header(Name, Req, Default, fun cowboy_http:digits/1);
+	parse_header(Name, Req, Default, fun cow_http_hd:parse_content_length/1);
 parse_header(Name = <<"content-type">>, Req, Default) ->
 parse_header(Name = <<"content-type">>, Req, Default) ->
 	parse_header(Name, Req, Default, fun cowboy_http:content_type/1);
 	parse_header(Name, Req, Default, fun cowboy_http:content_type/1);
 parse_header(Name = <<"cookie">>, Req, Default) ->
 parse_header(Name = <<"cookie">>, Req, Default) ->