aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristopher Adams <[email protected]>2016-10-06 16:48:34 +0800
committerLoïc Hoguin <[email protected]>2016-10-18 10:43:47 +0200
commit59c32506c076c5f99e8b404bfed69a1239372a07 (patch)
treea279c634253569250a08844857a7b1ecc10edbb4 /src
parent932f1301c557ae486839e4af085ab7c401c1a4f1 (diff)
downloadcowboy-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.erl2
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