Commit d8036f60 authored by Andreas Jung's avatar Andreas Jung

Applied patch #2142

parent 9291da09
...@@ -98,7 +98,7 @@ from Globals import DTMLFile ...@@ -98,7 +98,7 @@ from Globals import DTMLFile
import urlparse, httplib import urlparse, httplib
from urllib import quote from urllib import quote
from string import lower, join, split from string import lower, join, split
from App.Common import rfc1123_date
def http_date(value, format='%a, %d %b %Y %H:%M:%S GMT'): def http_date(value, format='%a, %d %b %Y %H:%M:%S GMT'):
return time.strftime(format, time.gmtime(value)) return time.strftime(format, time.gmtime(value))
...@@ -173,8 +173,8 @@ class AcceleratedHTTPCache (Cache): ...@@ -173,8 +173,8 @@ class AcceleratedHTTPCache (Cache):
return return
# Set HTTP Expires and Cache-Control headers # Set HTTP Expires and Cache-Control headers
seconds=self.interval seconds=self.interval
expires=http_date(time.time() + seconds) expires=rfc1123_date(time.time() + seconds)
# RESPONSE.setHeader('Last-Modified', http_date(time.time())) # RESPONSE.setHeader('Last-Modified',rfc1123_date(time.time()))
RESPONSE.setHeader('Cache-Control', 'max-age=%d' % seconds) RESPONSE.setHeader('Cache-Control', 'max-age=%d' % seconds)
RESPONSE.setHeader('Expires', expires) RESPONSE.setHeader('Expires', expires)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment