[prev in list] [next in list] [prev in thread] [next in thread]
List: zope-cvs
Subject: [Zope-Checkins] SVN:
From: Tres Seaver <tseaver () palladion ! com>
Date: 2010-05-28 21:11:09
Message-ID: 20100528211109.A067F941B8 () cvs ! zope ! org
[Download RAW message or body]
Log message for revision 112826:
Replace contortions with idiomatic code.
Changed:
U Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py
-=-
Modified: Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py
===================================================================
--- Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py 2010-05-28 21:11:07 UTC (rev 112825)
+++ Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py 2010-05-28 21:11:09 UTC (rev 112826)
@@ -106,15 +106,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:
_______________________________________________
Zope-Checkins maillist - Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic