Martin Panter added the comment: This is not how URL joining is meant to work. For example if the base URL “. . ./foo.php?param=10” produces a HTML file with a relative link to “bar.php”, the parent path should be joined on, but not the query part.
I understand the Python implementation is meant to more or less follow the RFC. See the second example at <https://tools.ietf.org/html/rfc3986.html#section-5.4> which is the same form as your case, and shows the query part being removed: Base URI: http://a/b/c/d;p?q Relative reference: "g" Target URL: "http://a/b/c/g" There are occasionally cases where keeping the base query, or even joining two sets of query parameters together, is desirable. But these cases are rare and urljoin() is not meant to handle them. ---------- nosy: +vadmium _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24032> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com