* 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 36f323a..f43429b 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