[Zope-Checkins] SVN: Zope/branches/2.12/src/ZPublisher/HTTPResponse.py Yuck -- who gets the blame for that?
Tres Seaver
tseaver at palladion.com
Fri May 28 17:54:45 EDT 2010
Log message for revision 112829:
Yuck -- who gets the blame for that?
Changed:
U Zope/branches/2.12/src/ZPublisher/HTTPResponse.py
-=-
Modified: Zope/branches/2.12/src/ZPublisher/HTTPResponse.py
===================================================================
--- Zope/branches/2.12/src/ZPublisher/HTTPResponse.py 2010-05-28 21:44:13 UTC (rev 112828)
+++ Zope/branches/2.12/src/ZPublisher/HTTPResponse.py 2010-05-28 21:54:45 UTC (rev 112829)
@@ -901,13 +901,7 @@
for key, val in headers.items():
if key.lower() == key:
# only change non-literal header names
- key = "%s%s" % (key[:1].upper(), key[1:])
- start = 0
- l = key.find('-',start)
- while l >= start:
- key = "%s-%s%s" % (key[:l],key[l+1:l+2].upper(),key[l+2:])
- start = l + 1
- l = key.find('-', start)
+ key = '-'.join([x.capitalize() for x in key.split('-')])
append("%s: %s" % (key, val))
if self.cookies:
headersl = headersl+self._cookie_list()
More information about the Zope-Checkins
mailing list