[issue39799] Never return base's fragment from urljoin (urllib.parse)

2020-02-29 Thread Open Close


Change by Open Close :


--
pull_requests: +18069
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18710

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39799] Never return base's fragment from urljoin (urllib.parse)

2020-02-29 Thread Open Close


Open Close  added the comment:

Uploaded the patch (1.patch).

--
keywords: +patch
Added file: https://bugs.python.org/file48935/1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39799] Never return base's fragment from urljoin (urllib.parse)

2020-02-29 Thread Open Close


New submission from Open Close :

According to RFC3986 5.2.2.,
target fragment is always reference fragment
(T.fragment = R.fragment;).

This is different from RFC1808 (4. and 5.2.).
And it is not mentioned
in Modifications section in RFC2396 and RFC3986.

Current:
>>> import urllib.parse
>>> urllib.parse.urljoin('http://a/b#f', '')
'http://a/b#f'

Should return:
'http://a/b'

---

https://tools.ietf.org/html/rfc3986#section-5.2.2
https://tools.ietf.org/html/rfc1808.html#section-4
https://tools.ietf.org/html/rfc1808.html#section-5.2

--
components: Library (Lib)
messages: 362983
nosy: op368
priority: normal
severity: normal
status: open
title: Never return base's fragment from urljoin (urllib.parse)
type: behavior
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com