summaryrefslogtreecommitdiffhomepage
path: root/libs/http
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-06-28 16:17:45 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-06-28 16:17:45 +0000
commitcd4353e65fc5523d541e518577616245e00bd98f (patch)
tree93c289683b2b468245ea78fc2ea4f9ce3476b344 /libs/http
parente08b97565f2a2dfeb482be0f061bfefa93d32556 (diff)
* libs/http: add Date header for 304 responses
Diffstat (limited to 'libs/http')
-rw-r--r--libs/http/luasrc/http/protocol/conditionals.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/http/luasrc/http/protocol/conditionals.lua b/libs/http/luasrc/http/protocol/conditionals.lua
index 36f323a6e..f43429bbb 100644
--- a/libs/http/luasrc/http/protocol/conditionals.lua
+++ b/libs/http/luasrc/http/protocol/conditionals.lua
@@ -58,6 +58,7 @@ function if_modified_since( req, stat )
return false, 304, {
["ETag"] = mk_etag( stat );
+ ["Date"] = date.to_http( os.time() );
["Last-Modified"] = date.to_http( stat.mtime )
}
end
@@ -79,6 +80,7 @@ function if_none_match( req, stat )
then
return false, 304, {
["ETag"] = mk_etag( stat );
+ ["Date"] = date.to_http( os.time() );
["Last-Modified"] = date.to_http( stat.mtime )
}
else