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 martin.panter
Recipients eric.araujo, martin.panter, orsenthil, v+python
Date 2015-10-02.03:24:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443756277.21.0.00645095007107.issue14567@psf.upfronthosting.co.za>
In-reply-to
Content
I think the decision on how to parse the “path” attribute has to be left up to each request handler implementation, rather than being done blindly in BaseHTTPRequestHandler.parse_request(). The reason is there are various forms of HTTP request target that don’t actually have a path:

OPTIONS *  # Asterisk form
OPTIONS http://example.net  # Absolute form with no path nor query
CONNECT example.net:443  # Authority form

I agree that the current situation is far from ideal, and a function or method to parse a URL path should be very useful. Functions urlparse() and urlsplit() can already help with splitting off the query.

Currently there is double percent-decoding going on in the CGI server. “GET /cgi-bin/%2574est.py” decodes to “test.py”, when it should only decode as “%74est.py”. This is probably a side-effect of fixing Issue 14566 and related bugs.

Also, see Issue 5714 about making this function a public API.
History
Date User Action Args
2015-10-02 03:24:37martin.pantersetrecipients: + martin.panter, orsenthil, eric.araujo, v+python
2015-10-02 03:24:37martin.pantersetmessageid: <1443756277.21.0.00645095007107.issue14567@psf.upfronthosting.co.za>
2015-10-02 03:24:37martin.panterlinkissue14567 messages
2015-10-02 03:24:36martin.pantercreate