Title: urljoin behavior unclear/not following RFC 3986
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: matthewkenigsberg, orsenthil, xtreak
Priority: normal Keywords:

Created on 2019-06-11 15:45 by matthewkenigsberg, last changed 2019-06-11 16:05 by xtreak.

Messages (1)
msg345243 - (view) Author: Matthew Kenigsberg (matthewkenigsberg) Date: 2019-06-11 15:45
Was trying to figure out the exact behavior of urljoin. As far as I can tell (see it should follow RFC 3986.  According to the algorithm in 5.2.2, I think this is wrong:
>>> urljoin("ftp://netloc", "http://a/b/../c/d")

And the .. should get removed.

Might be a separate issue, but at the very least, I think the docs should be updated to describe the exact behavior, or at least more directly state that the behavior defined in RFC 3986 is followed.

Would be happy to write a patch if a change is needed.
Date User Action Args
2019-06-11 16:05:07xtreaksetnosy: + orsenthil, xtreak
components: + Library (Lib)
2019-06-11 15:45:18matthewkenigsbergcreate