aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoremellor@ewan <emellor@ewan>2005-09-30 11:55:49 +0100
committeremellor@ewan <emellor@ewan>2005-09-30 11:55:49 +0100
commit8d170a29890ec7eb6ac2c28cce5fe6ffcb359164 (patch)
treebc962356bd78505f0d6c687491873ce999a71d55 /tools
parent1b19d438d2ee5511b40c3e538437596f63d50527 (diff)
downloadxen-8d170a29890ec7eb6ac2c28cce5fe6ffcb359164.tar.gz
xen-8d170a29890ec7eb6ac2c28cce5fe6ffcb359164.tar.bz2
xen-8d170a29890ec7eb6ac2c28cce5fe6ffcb359164.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/web/http.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/python/xen/web/http.py b/tools/python/xen/web/http.py
index 5cabb95e24..e11d8d29bd 100644
--- a/tools/python/xen/web/http.py
+++ b/tools/python/xen/web/http.py
@@ -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()