diff options
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r-- | src/cowboy_http_req.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl index feb795c..12d117f 100644 --- a/src/cowboy_http_req.erl +++ b/src/cowboy_http_req.erl @@ -205,6 +205,8 @@ parse_header_default('Accept-Charset') -> []; parse_header_default('Accept-Encoding') -> []; parse_header_default('Accept-Language') -> []; parse_header_default('Connection') -> []; +parse_header_default('If-Match') -> '*'; +parse_header_default('If-None-Match') -> '*'; parse_header_default(_Name) -> undefined. %% @doc Semantically parse headers. @@ -243,6 +245,12 @@ parse_header(Name, Req, Default) when Name =:= 'Content-Length' -> cowboy_http:digits(Value) end); parse_header(Name, Req, Default) + when Name =:= 'If-Match'; Name =:= 'If-None-Match' -> + parse_header(Name, Req, Default, + fun (Value) -> + cowboy_http:entity_tag_match(Value) + end); +parse_header(Name, Req, Default) when Name =:= 'If-Modified-Since'; Name =:= 'If-Unmodified-Since' -> parse_header(Name, Req, Default, fun (Value) -> |