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

Use cow_http_hd:parse_content_length/1 where applicable

This commit is contained in:
Loïc Hoguin 2014-03-24 14:11:15 +01:00
parent 2629f70ef3
commit dff1b5715c

View file

@ -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) ->