[Python-checkins] python/dist/src/Lib urllib2.py,1.42,1.43

Skip Montanaro skip@pobox.com
2003年5月12日 10:07:55 -0500


 bcannon> Change Request.add_header to call string.capitalize in order to
 bcannon> normalize headers and not have any dependency on case. Closes
 bcannon> patch #649742.
 bcannon> ! self.headers[key.capitalize()] = val
Maybe use key.title() instead?
 >>> "content-type".capitalize()
 'Content-type'
 >>> "content-type".title()
 'Content-Type'
Skip

AltStyle によって変換されたページ (->オリジナル) /