* libs/http: add Date header for 304 responses
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 28 Jun 2008 16:17:45 +0000 (16:17 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 28 Jun 2008 16:17:45 +0000 (16:17 +0000)
libs/http/luasrc/http/protocol/conditionals.lua

index 36f323a6e5e3dbb2013783c95885493f48302e9a..f43429bbbfb9ad2551a0eb14520b227d63721d62 100644 (file)
@@ -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