changeset 5222:374c45511319

attachments/drawings: use 1y old Expires: header so user agent asks in every case (and we respond with 304 NOT MODIFIED or 200 OK)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 12 Oct 2009 16:36:45 +0200
parents dd5fc2391c85
children 27b2c87e8212
files MoinMoin/action/AttachFile.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Mon Oct 12 16:21:30 2009 +0200
+++ b/MoinMoin/action/AttachFile.py	Mon Oct 12 16:36:45 2009 +0200
@@ -782,8 +782,7 @@
         request.headers.add('Date', http_date(now))
         request.headers.add('Content-Type', content_type)
         request.headers.add('Last-Modified', http_date(timestamp))
-        # Expire content fast, browser shall ask and get 200 or 304 answer:
-        request.headers.add('Expires', http_date(now + 10))
+        request.headers.add('Expires', http_date(now - 365 * 24 * 3600))
         #request.headers.add('Content-Length', os.path.getsize(fpath))
         content_dispo_string = '%s; filename="%s"' % (content_dispo, filename_enc)
         request.headers.add('Content-Disposition', content_dispo_string)
@@ -824,8 +823,7 @@
         request.headers.add('Date', http_date(now))
         request.headers.add('Content-Type', content_type)
         request.headers.add('Last-Modified', http_date(timestamp))
-        # Expire content fast, browser shall ask and get 200 or 304 answer:
-        request.headers.add('Expires', http_date(now + 10))
+        request.headers.add('Expires', http_date(now - 365 * 24 * 3600))
         request.headers.add('Content-Length', os.path.getsize(fpath))
         content_dispo_string = '%s; filename="%s"' % (content_dispo, filename_enc)
         request.headers.add('Content-Disposition', content_dispo_string)