Mercurial > moin > 1.9
changeset 943:274b021f26b1
remove some unused code from send_raw
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sun, 16 Jul 2006 15:32:59 +0200 |
parents | 86ea8f868030 |
children | 7c8e8d370740 |
files | MoinMoin/Page.py |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/Page.py Sun Jul 16 15:12:06 2006 +0200 +++ b/MoinMoin/Page.py Sun Jul 16 15:32:59 2006 +0200 @@ -958,13 +958,11 @@ request = self.request request.http_headers(["Content-type: text/plain;charset=%s" % config.charset]) if self.exists(): - if not request.cacheable: - request.http_headers(request.nocache) - else: - # use the correct last-modified value from the on-disk file - # to ensure cacheability where supported - request.http_headers(["Last-Modified: " + - timefuncs.formathttpdate(os.path.getmtime(self._text_filename()))]) + # use the correct last-modified value from the on-disk file + # to ensure cacheability where supported. Because we are sending + # RAW (file) content, the file mtime is correct as Last-Modified header. + request.http_headers(["Last-Modified: " + + timefuncs.formathttpdate(os.path.getmtime(self._text_filename()))]) text = self.get_raw_body() text = self.encodeTextMimeType(text)