Mercurial > moin > 1.9
changeset 990:70d5ae05e791
better no Last-Modified header than a incorrect one
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Tue, 18 Jul 2006 22:10:54 +0200 |
parents | 79e70c3cef6d |
children | 324a20dad828 05629312d4d7 |
files | MoinMoin/Page.py |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/Page.py Tue Jul 18 12:56:14 2006 +0200 +++ b/MoinMoin/Page.py Tue Jul 18 22:10:54 2006 +0200 @@ -1172,14 +1172,12 @@ if not request.cacheable or request.user.valid: request.http_headers(request.nocache) else: - # use the correct last-modified value from the on-disk file - # to ensure cacheability where supported - # TODO: for page likes RecentChanges (generally: ALL pages - # with dynamically changing content), we MUST NOT use the - # page src mtime as last-modified header. XXX - request.http_headers(["Last-Modified: " + - timefuncs.formathttpdate(os.path.getmtime(self._text_filename()))]) - + # TODO: we need to know if a page generates dynamic content + # if it does, we must not use the page file mtime as last modified value + # XXX The following code is commented because it is incorrect for dynamic pages: + #lastmod = os.path.getmtime(self._text_filename()) + #request.http_headers(["Last-Modified: %s" % timefuncs.formathttpdate(lastmod)]) + pass else: request.http_headers(['Status: 404 NOTFOUND']) request.setResponseCode(404)