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


Groups > comp.lang.python > #59875

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

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <logan@s1network.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'assuming': 0.09; 'http': 0.09; 'received:internal': 0.09; 'python': 0.11; 'suggest': 0.14; 'interacting': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'subject: \n ': 0.16; 'subject:3.3': 0.16; 'webservice': 0.16; 'everyone,': 0.19; 'passing': 0.19; "python's": 0.19; 'string,': 0.24; 'header': 0.24; 'question': 0.24; 'pass': 0.26; 'related': 0.29; 'thanks!': 0.32; 'everyone': 0.33; 'received:66': 0.35; 'subject: (': 0.35; 'advice': 0.35; 'but': 0.35; 'edge': 0.36; 'received:10': 0.37; 'being': 0.38; 'server': 0.38; 'to:addr :python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'subject:skip:C 10': 0.61; 'header:Message-Id:1': 0.63; 'name': 0.63; 'field': 0.63; 'applying': 0.72; 'hoping': 0.75; 'recognize.': 0.84; 'standards.': 0.84
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=s1network.com; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:subject:date; s=mesmtp; bh=BMN4jR+Sw+xAyaE3XMXAOOT 75g8=; b=Em61Q6z+qlP0Rf7tqaeY+edgrC7N2siiju7TmO0wfk+ZyiQOoA2vuWl +tmFuSqJ0EeUKZ6AmbmmQ3LA1cWM4eURc2DnbiXZi7QRkvZHpU8GN3r0A25tIqxg Z1BJduc8YBdHmrlNSdkLqCVSBsk4pXmERTg/Wy/q4A8wBrG2wIr0=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:date; s=smtpout; bh=BMN4jR+Sw+xAyaE3XMXAOOT75g8=; b=ftlNoFZdsoVBxOHYl945tCC10DJB JCiwJne6n4bNVpa1rfkiXty8TQmiF5mluNYV2lDw+36Gl26KaxUztV84BEIew5+V RWuE1EHjg7JaaLnS1fJY8jo4C7WvYOX3fIBL4KCEXXggw3IFp9qpG8dPKzgwdFjr m94uDOhQAJnJOXY=
X-Sasl-Enc bKNKZKv0W08t93TtGbbucvbE0Sv7Exc95L5EGVGd+hVZ 1384784702
From Logan Owen <logan@s1network.com>
To python-list@python.org
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Content-Type text/plain
X-Mailer MessagingEngine.com Webmail Interface - ajax-d4893488
Subject HTTP Header Capitalization in urllib.request.AbstractHTTPHandler (Python 3.3)
Date Mon, 18 Nov 2013 09:25:02 -0500
X-Mailman-Approved-At Mon, 18 Nov 2013 15:33:51 +0100
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2848.1384785232.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1384785232 news.xs4all.nl 15899 [2001:888:2000:d::a6]:58606
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:59875

Show key headers only | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web