Commit 42eaa511 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

FSController: fixed caching of getfile responses

must-revalidate was effectively not respected by the browsers within the
same document
parent 41ec793e
......@@ -61,11 +61,9 @@ class FSController(AbstractController):
# Set the Last-Modified response header, so that
# modified-since validation code can work.
headers = cherrypy.response.headers
'Cache-Control'] = 'max-age=1, private, must-revalidate, no-cache'
headers['Pragma'] = 'no-cache'
# headers['Cache-Control'] = 'no-cache, private, must-revalidate, max-age=0' # browser ignores this in the same document
headers['Cache-Control'] = 'no-store'
headers['Last-Modified'] = httputil.HTTPDate(stats.st_mtime)
headers['Expires'] = httputil.HTTPDate(stats.st_mtime + 1)
headers['Content-Length'] = stats.st_size
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