projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e08b975
)
* libs/http: add Date header for 304 responses
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 28 Jun 2008 16:17:45 +0000
(16:17 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 28 Jun 2008 16:17:45 +0000
(16:17 +0000)
libs/http/luasrc/http/protocol/conditionals.lua
patch
|
blob
|
history
diff --git
a/libs/http/luasrc/http/protocol/conditionals.lua
b/libs/http/luasrc/http/protocol/conditionals.lua
index 36f323a6e5e3dbb2013783c95885493f48302e9a..f43429bbbfb9ad2551a0eb14520b227d63721d62 100644
(file)
--- 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