ia64/xen-unstable

changeset 7150:a39510ad5c59

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>
author emellor@ewan
date Fri Sep 30 11:55:49 2005 +0100 (2005-09-30)
parents 345e517bab57
children 4a2c162d3e7c
files tools/python/xen/web/http.py
line diff
     1.1 --- a/tools/python/xen/web/http.py	Fri Sep 30 11:40:59 2005 +0100
     1.2 +++ b/tools/python/xen/web/http.py	Fri Sep 30 11:55:49 2005 +0100
     1.3 @@ -437,6 +437,9 @@ class HttpRequest:
     1.4          send_body = self.hasBody()
     1.5          if not self.close_connection:
     1.6              self.setResponseHeader("Connection", "keep-alive")
     1.7 +        self.setResponseHeader("Pragma", "no-cache")
     1.8 +        self.setResponseHeader("Cache-Control", "no-cache")
     1.9 +        self.setResponseHeader("Expires", "-1")
    1.10          if send_body:
    1.11              self.output.seek(0, 0)
    1.12              body = self.output.getvalue()