Martin Panter added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5714> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com