aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-03-24 14:11:40 +0100
committerLoïc Hoguin <[email protected]>2014-03-24 14:24:52 +0100
commitdbf7b1c5e52688a8c8caa25a3692031afcf5e7be (patch)
tree04437a2d2cb1321abeeb33e9c6ded3a67a4b16c8
parentdff1b5715c286f0f0fb43bcb33de87f97c878eaa (diff)
downloadcowboy-dbf7b1c5e52688a8c8caa25a3692031afcf5e7be.tar.gz
cowboy-dbf7b1c5e52688a8c8caa25a3692031afcf5e7be.tar.bz2
cowboy-dbf7b1c5e52688a8c8caa25a3692031afcf5e7be.zip
Use cow_http_hd:parse_transfer_encoding/1 where applicable
-rw-r--r--src/cowboy_req.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 0a9aff6..552c3ba 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -454,10 +454,10 @@ parse_header(Name, Req, Default)
fun (Value) ->
cowboy_http:nonempty_list(Value, fun cowboy_http:token/2)
end);
-%% @todo Extension parameters.
-parse_header(Name, Req, Default)
- when Name =:= <<"transfer-encoding">>;
- Name =:= <<"upgrade">> ->
+parse_header(Name = <<"transfer-encoding">>, Req, Default) ->
+ parse_header(Name, Req, Default, fun cow_http_hd:parse_transfer_encoding/1);
+%% @todo Product version.
+parse_header(Name = <<"upgrade">>, Req, Default) ->
parse_header(Name, Req, Default,
fun (Value) ->
cowboy_http:nonempty_list(Value, fun cowboy_http:token_ci/2)