Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59875 > unrolled thread

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

Started byLogan Owen <logan@s1network.com>
First post2013-11-18 09:25 -0500
Last post2013-11-18 09:25 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  HTTP Header Capitalization in urllib.request.AbstractHTTPHandler (Python 3.3) Logan Owen <logan@s1network.com> - 2013-11-18 09:25 -0500

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

FromLogan Owen <logan@s1network.com>
Date2013-11-18 09:25 -0500
SubjectHTTP Header Capitalization in urllib.request.AbstractHTTPHandler (Python 3.3)
Message-ID<mailman.2848.1384785232.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web