[zope2-tracker] [Bug 509926] [NEW] response.appendHeader leaves carriage return cruft behind

Launchpad Bug Tracker 509926 at bugs.launchpad.net
Tue Jan 19 20:17:33 EST 2010


You have been subscribed to a public bug:

In ZPublixher.HTTPResponse.appendHeader, we seem to be inserting some
carriage return cruft in the header value which doesn't get cleaned up
after.

Possible patch...

--- HTTPResponse.py
+++ (clipboard)
@@ -592,14 +592,16 @@
         set for the header. '''
         name, value = _scrubHeader(name, value)
         name = name.lower()
+        scrubbed = True
 
         headers = self.headers
         if headers.has_key(name):
             h = headers[name]
-            h = "%s%s\r\n\t%s" % (h,delimiter,value)
+            h = "%s%s%s" % (h,delimiter,value)
+            scrubbed = False
         else:
             h = value
-        self.setHeader(name,h, scrubbed=True)
+        self.setHeader(name,h, scrubbed=scrubbed)
 
     def isHTML(self, s):
         s = s.lstrip()

** Affects: zope2
     Importance: Undecided
         Status: New

-- 
response.appendHeader leaves carriage return cruft behind
https://bugs.launchpad.net/bugs/509926
You received this bug notification because you are a member of Zope 2 Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list