From 59c32506c076c5f99e8b404bfed69a1239372a07 Mon Sep 17 00:00:00 2001 From: Christopher Adams Date: Thu, 6 Oct 2016 16:48:34 +0800 Subject: 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. --- src/cowboy_rest.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3