Added cache-control headers to pages returned by HTTP server so that pages

expire immediately.  This prevents navigation to stale pages.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@ewan committed 2005-09-30 11:55:49 +01:00
1 parent 1b19d438d2
commit 8d170a2989
1 file changed
+3
+3
View File
@@ -437,6 +437,9 @@ class HttpRequest:
send_body = self.hasBody()
if not self.close_connection:
self.setResponseHeader("Connection", "keep-alive")
self.setResponseHeader("Pragma", "no-cache")
self.setResponseHeader("Cache-Control", "no-cache")
self.setResponseHeader("Expires", "-1")
if send_body:
self.output.seek(0, 0)
body = self.output.getvalue()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.