[New-bugs-announce] [issue37235] urljoin behavior unclear/not following RFC 3986

Matthew Kenigsberg report at bugs.python.org
Tue Jun 11 11:45:18 EDT 2019


New submission from Matthew Kenigsberg <matthewkenigsberg at gmail.com>:

Was trying to figure out the exact behavior of urljoin. As far as I can tell (see https://bugs.python.org/issue22118) 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")
'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.

----------
messages: 345243
nosy: Matthew Kenigsberg
priority: normal
severity: normal
status: open
title: urljoin behavior unclear/not following RFC 3986
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37235>
_______________________________________


More information about the New-bugs-announce mailing list