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