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 BreamoreBoy, chin, gregory.p.smith, martin.panter, orsenthil, r.david.murray
Date 2015-10-02.03:05:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443755155.11.0.581958086658.issue5714@psf.upfronthosting.co.za>
In-reply-to
Content
Some ideas for this sort of function (or perhaps a few related functions):

* Allow OS-independent handling of the path. E.g. the CGI server still has to check if each segment is a CGI script, the rest becomes PATH_INFO. Perhaps return a sequence of path segments rather than a string.
* Allow easy conversion to a valid OS path (or perhaps a pathlib object)
* Ensure that invalid and special OS filenames trigger an error (e.g. "NUL" or unsupported characters, including backslashes \, on Windows). Like a stricter version of pathlib’s is_reserved().
* Handle percent decoding

Also, see the SimpleHTTPRequestHandler.translate_path() method, and Issue 14567. There seems to be a lot of redundancy.
History
Date User Action Args
2015-10-02 03:05:55martin.pantersetrecipients: + martin.panter, gregory.p.smith, orsenthil, r.david.murray, chin, BreamoreBoy
2015-10-02 03:05:55martin.pantersetmessageid: <1443755155.11.0.581958086658.issue5714@psf.upfronthosting.co.za>
2015-10-02 03:05:55martin.panterlinkissue5714 messages
2015-10-02 03:05:54martin.pantercreate