[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/publisher/browser/fileresource.py also set cache control if we have a 304

Bernd Dorn bernd.dorn at lovelysystems.com
Thu Nov 23 17:20:17 EST 2006


Log message for revision 71286:
  also set cache control if we have a 304

Changed:
  U   Zope3/trunk/src/zope/app/publisher/browser/fileresource.py

-=-
Modified: Zope3/trunk/src/zope/app/publisher/browser/fileresource.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/fileresource.py	2006-11-23 21:11:21 UTC (rev 71285)
+++ Zope3/trunk/src/zope/app/publisher/browser/fileresource.py	2006-11-23 22:20:16 UTC (rev 71286)
@@ -62,6 +62,8 @@
         request = self.request
         response = request.response
 
+        setCacheControl(response)
+
         # HTTP If-Modified-Since header handling. This is duplicated
         # from OFS.Image.Image - it really should be consolidated
         # somewhere...
@@ -88,7 +90,6 @@
         response.setHeader('Content-Type', file.content_type)
         response.setHeader('Last-Modified', file.lmh)
 
-        setCacheControl(response)
         f = open(file.path,'rb')
         data = f.read()
         f.close()



More information about the Zope3-Checkins mailing list