* libs/http: add Date header for 304 responses
This commit is contained in:
parent
e08b97565f
commit
cd4353e65f
1 changed files with 2 additions and 0 deletions
|
@ -58,6 +58,7 @@ function if_modified_since( req, stat )
|
||||||
|
|
||||||
return false, 304, {
|
return false, 304, {
|
||||||
["ETag"] = mk_etag( stat );
|
["ETag"] = mk_etag( stat );
|
||||||
|
["Date"] = date.to_http( os.time() );
|
||||||
["Last-Modified"] = date.to_http( stat.mtime )
|
["Last-Modified"] = date.to_http( stat.mtime )
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -79,6 +80,7 @@ function if_none_match( req, stat )
|
||||||
then
|
then
|
||||||
return false, 304, {
|
return false, 304, {
|
||||||
["ETag"] = mk_etag( stat );
|
["ETag"] = mk_etag( stat );
|
||||||
|
["Date"] = date.to_http( os.time() );
|
||||||
["Last-Modified"] = date.to_http( stat.mtime )
|
["Last-Modified"] = date.to_http( stat.mtime )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue