mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 20:50:24 +00:00
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.
This commit is contained in:
parent
932f1301c5
commit
59c32506c0
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue