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.
Created on 2015年03月11日 00:49 by anthonyryan1, last changed 2022年04月11日 14:58 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| py3bug | anthonyryan1, 2015年03月11日 00:49 | Simple testcase demonstrating problem | ||
| py2bug | anthonyryan1, 2015年03月11日 00:50 | Simple testcase demonstrating problem | ||
| Messages (2) | |||
|---|---|---|---|
| msg237831 - (view) | Author: Anthony Ryan (anthonyryan1) | Date: 2015年03月11日 00:49 | |
The scgi protocol is not included in urllib.parse.uses_netloc list, while other less common protocols are (such as gopher). I would like to see scgi get added to this list. |
|||
| msg237837 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年03月11日 02:12 | |
See also Issue 16134 for adding RTMP schemes to the registry. However, I wonder if it is time for a more general fix, rather than having an arms race with whatever URL scheme someone dreams up next. According to Issue 7904, urlsplit() etc intentially support parsing the //netloc part for arbitrary URL schemes. However when putting it back together, the urlunsplit() etc functions currently cannot assume it is okay to insert an empty netloc "//", probably because it would break URLs like tel:+1234 or mailto:somebody@example.net. There are a bunch of URL-parsing issues floating around which may be able to come together to solve each other: * Issue 8339: Round trip stripping empty netloc, apparently closed because the URLs were thought to be invalid (thought I disagree) * Issue 15009: Round trip strips empty netloc for yelp:///foo * Issue 23505: Round trip stripping netloc considered a security issue * Issue 5843: Round trip stripping empty query and fragment strings * Issue 22852: Round trip strips empty fragment In Issue 22852, I proposed adding a series of has_netloc/query/fragment flags to the SplitResult etc classes. If that was implemented, we would not have to worry about whitelisting "scgi:" or other schemes in "uses_netloc". Instead, urlsplit() would automatically set SplitResult(has_netloc=True), and urlunsplit() would know to restore the empty "//" netloc string. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:13 | admin | set | github: 67824 |
| 2015年03月11日 04:16:12 | ned.deily | set | nosy:
+ orsenthil |
| 2015年03月11日 02:12:44 | martin.panter | set | nosy:
+ martin.panter messages: + msg237837 |
| 2015年03月11日 00:50:18 | anthonyryan1 | set | files: + py2bug |
| 2015年03月11日 00:49:52 | anthonyryan1 | create | |