HTTP Header Capitalization in urllib.request.AbstractHTTPHandler(Python 3.3)

L

Logan Owen

Hello everyone,

I was hoping for some advice in dealing with an edge case related to
Python's HTTP Header handling. Python is correctly assuming that the
HTTP header field name (eg Content-Type) is case insensitive, but I have
a webservice I am interacting with that does not follow the standards.
I am passing in the header "SOAPAction" and do_request of
AbstractHTTPHandler is applying title() to the string, leading to the
field name being "Soapaction", which the server does not recognize.

So my question is, what does everyone suggest is the best solution for
being able to pass a case sensitive header to the server?

Thanks!
Logan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top