changeset 3009:e67e97ad578f

better no content-length header than a wrong one, fixes truncated action=raw output for non-ascii pages (port from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 06 Jan 2008 19:11:06 +0100
parents f8738a94d990
children b4f97b0939ba
files MoinMoin/Page.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sun Jan 06 19:08:54 2008 +0100
+++ b/MoinMoin/Page.py	Sun Jan 06 19:11:06 2008 +0100
@@ -978,7 +978,7 @@
             request.setHttpHeader("Status: 200 OK")
             request.setHttpHeader("Last-Modified: %s" % util.timefuncs.formathttpdate(os.path.getmtime(self._text_filename())))
             text = self.encodeTextMimeType(self.body)
-            request.setHttpHeader("Content-Length: %d" % len(text))
+            #request.setHttpHeader("Content-Length: %d" % len(text))  # XXX WRONG! text is unicode obj, but we send utf-8!
             if content_disposition:
                 # TODO: fix the encoding here, plain 8 bit is not allowed according to the RFCs
                 # There is no solution that is compatible to IE except stripping non-ascii chars