diff options
author | Christopher Adams <[email protected]> | 2016-10-06 16:48:34 +0800 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-10-18 10:43:47 +0200 |
commit | 59c32506c076c5f99e8b404bfed69a1239372a07 (patch) | |
tree | a279c634253569250a08844857a7b1ecc10edbb4 /src | |
parent | 932f1301c557ae486839e4af085ab7c401c1a4f1 (diff) | |
download | cowboy-59c32506c076c5f99e8b404bfed69a1239372a07.tar.gz cowboy-59c32506c076c5f99e8b404bfed69a1239372a07.tar.bz2 cowboy-59c32506c076c5f99e8b404bfed69a1239372a07.zip |
Fix if_modified_since match of last_modified
Correct expected return type from `no_call` to `undefined` in
if_modified_since when last_modified callback is not defined. Add an
http_SUITE test to catch regressions.
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_rest.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index b760df2..33ef1d7 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -782,7 +782,7 @@ if_modified_since_now(Req, State, IfModifiedSince) -> if_modified_since(Req, State, IfModifiedSince) -> try last_modified(Req, State) of - {no_call, Req2, State2} -> + {undefined, Req2, State2} -> method(Req2, State2); {LastModified, Req2, State2} -> case LastModified > IfModifiedSince of |