changeset 1699:66f2ea899da7

fckdialog action: don't call emit_http_headers twice, fix wrong attribute name in emit_http_headers
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 20 Dec 2006 01:04:17 +0100
parents 35ebda626b4b
children 3c6f59cafbbe
files MoinMoin/action/fckdialog.py MoinMoin/request/__init__.py
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/fckdialog.py	Tue Dec 19 09:37:28 2006 +0100
+++ b/MoinMoin/action/fckdialog.py	Wed Dec 20 01:04:17 2006 +0100
@@ -246,7 +246,6 @@
         scriptname += "/"
     action = scriptname
     basepage = request.page.page_name.encode(config.charset)
-    request.emit_http_headers()
     request.write('''
 <!--
  * FCKeditor - The text editor for internet
@@ -397,7 +396,6 @@
     if not scriptname or scriptname[-1] != "/":
         scriptname += "/"
     action = scriptname
-    request.emit_http_headers()
     request.write('''
 <!--
  * FCKeditor - The text editor for internet
--- a/MoinMoin/request/__init__.py	Tue Dec 19 09:37:28 2006 +0100
+++ b/MoinMoin/request/__init__.py	Wed Dec 20 01:04:17 2006 +0100
@@ -1188,9 +1188,10 @@
 
         # Send headers only once
         sent_headers = getattr(self, 'sent_headers', 0)
-        self.sent_headers = sent_headers + 1
-        if sent_headers:
-            raise HeadersAlreadySentException("emit_http_headers called multiple (%d) times! Headers: %r" % (sent_headers, headers))
+        sent_headers += 1
+        self.sent_headers = sent_headers
+        if sent_headers > 1:
+            raise HeadersAlreadySentException("emit_http_headers called multiple (%d) times! Headers: %r" % (sent_headers, all_headers))
         #else:
         #    self.log("Notice: emit_http_headers called first time. Headers: %r" % all_headers)