-
-
Notifications
You must be signed in to change notification settings - Fork 34k
Open
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dir
Description
urlparse() is similar to urlsplit(), but additionally it splits path on path and params using the ";" separator. This is wrong. First, the corresponding RFCs (RFC 3986, RFC 8820) do not list "params" as a separate URI component. Second, the ";" separator is used to specify parameters for a path segment, not the whole path. And this is scheme-specific, most schemes don't use it or use "," for similar purpose. It is mentioned in RFC 3986, but not in RFC 8820.
So, it is better to use urlsplit() and then parse path if needed. I afraid that most users of urlparse() are not aware of this, and only use it because it have more attractive name than urlsplit().
We should clearly document urlparse() as obsolete.
cc @orsenthil
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
Todo