changeset 1100:a60c236bf0ac

Merge with main.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sun, 30 Jul 2006 03:59:50 +0200
parents 92f5835853ae (current diff) a6bb4df3888d (diff)
children 71a996462a09 2aa53ed0afa0
files MoinMoin/request/__init__.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/request/__init__.py	Sun Jul 30 03:55:58 2006 +0200
+++ b/MoinMoin/request/__init__.py	Sun Jul 30 03:59:50 2006 +0200
@@ -1139,8 +1139,9 @@
 
             @param more_headers: list of additional header strings
         """
-        headers = more_headers + getattr(self, 'user_headers', [])
+        user_headers = getattr(self, 'user_headers', [])
         self.user_headers = []
+        all_headers = more_headers + user_headers
 
         # Send headers only once
         sent_headers = getattr(self, 'sent_headers', 0)
@@ -1148,13 +1149,13 @@
         if sent_headers:
             raise HeadersAlreadySentException("emit_http_headers called multiple (%d) times! Headers: %r" % (sent_headers, headers))
         #else:
-        #    self.log("Notice: emit_http_headers called first time. Headers: %r" % headers)
+        #    self.log("Notice: emit_http_headers called first time. Headers: %r" % all_headers)
 
         content_type = None
         status = None
         headers = []
         # assemble complete list of http headers
-        for header in headers:
+        for header in all_headers:
             if isinstance(header, unicode):
                 header = header.encode('ascii')
             key, value = header.split(':', 1)