diff options
author | Robert Brewer <fumanchu@aminus.org> | 2006-07-25 03:10:26 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2006-07-25 03:10:26 +0000 |
commit | 9b1525e291065153475da7a23379b6b94a52c960 (patch) | |
tree | 110a8dfe15b79487b08ae685c8139d3b1f03658e /cherrypy/lib/caching.py | |
parent | 6fa4fb6500a0b349304a072aeff4154fe348a8d4 (diff) | |
download | cherrypy-git-9b1525e291065153475da7a23379b6b94a52c960.tar.gz |
Test and fix for bug in expires tool.
Diffstat (limited to 'cherrypy/lib/caching.py')
-rw-r--r-- | cherrypy/lib/caching.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cherrypy/lib/caching.py b/cherrypy/lib/caching.py index 6c78ce8c..06ec678d 100644 --- a/cherrypy/lib/caching.py +++ b/cherrypy/lib/caching.py @@ -185,7 +185,6 @@ def expires(secs=0, force=False): if isinstance(secs, datetime.timedelta): secs = (86400 * secs.days) + secs.seconds expiry = http.HTTPDate(cherrypy.response.time + secs) - cptools.response_headers([("Expires", expiry)], force) if secs == 0: cacheable = False @@ -199,3 +198,6 @@ def expires(secs=0, force=False): cptools.response_headers([("Pragma", "no-cache")], force) if cherrypy.request.version >= (1, 1): cptools.response_headers([("Cache-Control", "no-cache")], force) + + # Set after Pragma, Cache-Control so it doesn't interfere with 'indicators' + cptools.response_headers([("Expires", expiry)], force) |