mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
1b19d438d2
commit
8d170a2989
1 file changed
+3
@@ -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()
|
||||
|
||||