aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_req.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2011-11-04 15:55:55 +0100
committerAnthony Ramine <[email protected]>2011-11-10 11:53:37 +0100
commit6fa7659dbb1712926040a3ee257b3fbf21bfd754 (patch)
tree237f494aad5c2c0cdd8265e8e1fef7132d0b1114 /src/cowboy_http_req.erl
parentb184b3588db5aab17b74269b9b81d640c559da4f (diff)
downloadcowboy-6fa7659dbb1712926040a3ee257b3fbf21bfd754.tar.gz
cowboy-6fa7659dbb1712926040a3ee257b3fbf21bfd754.tar.bz2
cowboy-6fa7659dbb1712926040a3ee257b3fbf21bfd754.zip
Support 'Content-Type' in parse_header/2
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r--src/cowboy_http_req.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index 12d117f..fa4e620 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -244,6 +244,11 @@ parse_header(Name, Req, Default) when Name =:= 'Content-Length' ->
fun (Value) ->
cowboy_http:digits(Value)
end);
+parse_header(Name, Req, Default) when Name =:= 'Content-Type' ->
+ parse_header(Name, Req, Default,
+ fun (Value) ->
+ cowboy_http:content_type(Value)
+ end);
parse_header(Name, Req, Default)
when Name =:= 'If-Match'; Name =:= 'If-None-Match' ->
parse_header(Name, Req, Default,