So what you're asking is: How can Python be made less standards-compliant?
Well! You may be in luck. The evil part of my brain has just gone
digging for a solution. According to cpython/Lib/urllib/request.py
from Python 3.4 alpha (unlikely to be different in 3.3), the code
you're looking for is either line 1193ish:
for name, value in self.parent.addheaders:
name = name.capitalize()
if not request.has_header(name):
request.add_unredirected_header(name, value)
or line 1226:
headers = dict((name.title(), val) for name, val in headers.items())
I'm assuming you're either stuffing stuff into addheaders or passing
it headers. Well, dere's nuffink says it has to be a string...
class SOAPAction:
def capitalize(self):
return "SOAPAction"
title = capitalize
Just use SOAPAction() instead of "SOAPAction" as your key, and TYAOOYDAO!
ChrisA
[1] "there you are, out of your difficulty at once" - cf WS Gilbert's "Iolanthe"