This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mouad
Recipients mouad, pje
Date 2014-05-11.11:31:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399807913.92.0.0240575633204.issue21472@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

As most of you know, working behind a HTTP proxy raise all this corner cases that no one think about until he has to, one of them i had to deal with some months ago is absolute request URI in HTTP request, that some client will send when they detect that they are behind an HTTP proxy, to be more precise i am talking about this section of rfc2616 (https://gist.github.com/mouadino/7930974), i.e.

  GET http://domain.com/path HTTP/1.1

As my surprise i found that most WSGI server that are out there doesn't support very well this feature including wsgiref, to test that i have created this simple python script https://gist.github.com/mouadino/7930974 that include also status of this bug in different other projects.

In term of bug impact, if a WSGI server doesn't support this, the WSGI environment variable PATH_INFO will end up containing an absolute URI instead of relative as the standard require (http://legacy.python.org/dev/peps/pep-0333/), which mean that most uri routing that web framework do end up failing (Returning 404) b/c most of them will try to much PATH_INFO with there different routes (which are relative paths) to find which controller action should they executed e.g. https://pypi.python.org/pypi/Routes .

FWIW i found this bug while trying to debug boto library (that use absolute uri if proxy is detected https://github.com/mouadino/boto/blob/v2.13.2/boto/connection.py#L955) that was communicating with an OpenStack API that use eventlet wsgi server  (That doesn't handle absolute URI https://github.com/eventlet/eventlet/blob/v0.14/eventlet/wsgi.py#L471) and routes (that match PATH_INFO with action path https://github.com/bbangert/routes/blob/master/routes/mapper.py#L678).
History
Date User Action Args
2014-05-11 11:31:54mouadsetrecipients: + mouad, pje
2014-05-11 11:31:53mouadsetmessageid: <1399807913.92.0.0240575633204.issue21472@psf.upfronthosting.co.za>
2014-05-11 11:31:53mouadlinkissue21472 messages
2014-05-11 11:31:52mouadcreate