Message252079
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. |
|
Date |
User |
Action |
Args |
2015-10-02 03:05:55 | martin.panter | set | recipients:
+ martin.panter, gregory.p.smith, orsenthil, r.david.murray, chin, BreamoreBoy |
2015-10-02 03:05:55 | martin.panter | set | messageid: <1443755155.11.0.581958086658.issue5714@psf.upfronthosting.co.za> |
2015-10-02 03:05:55 | martin.panter | link | issue5714 messages |
2015-10-02 03:05:54 | martin.panter | create | |
|