Message139515
Sorry, I should clarify.. The str() patch worked, but it failed to work within the realm of urllib2:
s = _str("Content-MD5")
print "Builtin:"
print "plain: %s" % ( s )
print "capitalized: %s" % ( s.capitalize() )
s = str("Content-MD5")
print "Builtin:"
print "plain: %s" % ( s )
print "capitalized: %s" % ( s.capitalize() )
Builtin:
plain: Content-MD5
capitalized: Content-MD5
Builtin:
plain: Content-MD5
capitalized: Content-md5
Why it works in the unit test, and not within urllib2, is totally beyond me. Especially since I put a debug call on the method, and it does get called.. yet urllib2 debug still shows it sending the wrong value.
---
capitalize() bypassed: sending value: Content-MD5
send: 'POST /api/url\r\nContent-Md5: nts0yj7AdzJALyNOxafDyA==\r\n\r\n'
---
I have a feeling that the problem may lie somewhere after the opener (like HTTPConnection or AbstractHTTPHandler), rather than the urllib2 calls to capitalize(), but not having much luck monkey patching those :X |
|
Date |
User |
Action |
Args |
2011-06-30 19:39:53 | Cal.Leeming | set | recipients:
+ Cal.Leeming, r.david.murray |
2011-06-30 19:39:53 | Cal.Leeming | set | messageid: <1309462793.26.0.295451194415.issue12455@psf.upfronthosting.co.za> |
2011-06-30 19:39:52 | Cal.Leeming | link | issue12455 messages |
2011-06-30 19:39:52 | Cal.Leeming | create | |
|