aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_req.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r--src/cowboy_http_req.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index 911aca1..2b17f9c 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -236,6 +236,12 @@ parse_header(Name, Req, Default) when Name =:= 'Content-Length' ->
fun (Value) ->
cowboy_http:digits(Value)
end);
+parse_header(Name, Req, Default)
+ when Name =:= 'If-Modified-Since'; Name =:= 'If-Unmodified-Since' ->
+ parse_header(Name, Req, Default,
+ fun (Value) ->
+ cowboy_http:http_date(Value)
+ end);
parse_header(Name, Req, Default) ->
{Value, Req2} = header(Name, Req, Default),
{undefined, Value, Req2}.