[issue1432] Strange behavior of urlparse.urljoin
Roman Petrichev
report at bugs.python.org
Thu Jul 17 21:20:17 CEST 2008
Roman Petrichev <tier at inbox.ru> added the comment:
Senthil, please read the RFC3986 text, not only examples.
[Page 31] contains exact algorithm how to handle this case.
--cut--
if (R.path == "") then
T.path = Base.path;
if defined(R.query) then
T.query = R.query;
else
T.query = Base.query;
endif;
--cut--
I.e. instead of:
>>> urljoin('http://www.ya.ru/index.php', '?o=30&a=l')
'http://www.ya.ru/?o=30&a=l'
python SHOULD do:
>>> urljoin('http://www.ya.ru/index.php', '?o=30&a=l')
'http://www.ya.ru/index.php?o=30&a=l'
Look at any browser's handling this case.
----------
nosy: +tier
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1432>
_______________________________________
More information about the Python-bugs-list
mailing list