[New-bugs-announce] [issue32779] urljoining an empty query string doesn't clear query string
Paul Fisher
report at bugs.python.org
Mon Feb 5 23:48:49 EST 2018
New submission from Paul Fisher <thetorpedodog at gmail.com>:
urljoining with '?' will not clear a query string:
ACTUAL:
>>> import urllib.parse
>>> urllib.parse.urljoin('http://a/b/c?d=e', '?')
'http://a/b/c?d=e'
EXPECTED:
'http://a/b/c' (optionally, with a ? at the end)
WhatWG's URL standard expects a relative URL consisting of only a ? to replace a query string:
https://url.spec.whatwg.org/#relative-state
Seen in versions 3.6 and 2.7, but probably also affects later versions.
----------
components: Library (Lib)
messages: 311704
nosy: Paul Fisher
priority: normal
severity: normal
status: open
title: urljoining an empty query string doesn't clear query string
type: behavior
versions: Python 2.7, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32779>
_______________________________________
More information about the New-bugs-announce
mailing list