* libs/http: add Date header for 304 responses

This commit is contained in:
Jo-Philipp Wich 2008-06-28 16:17:45 +00:00
parent e08b97565f
commit cd4353e65f

View file

@ -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