Issue 32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (original) (raw)

Created on 2017-12-14 15:30 by socketpair, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4867 merged socketpair,2017-12-14 15:32
PR 4959 merged python-dev,2017-12-21 12:16
Messages (7)
msg308306 - (view) Author: Марк Коренберг (socketpair) * Date: 2017-12-14 15:30
qwe = urlsplit('http://[FE80::822a:a8ff:fe49:470c%Тест]:1234/keys') qwe.hostname will be 'fe80::822a:a8ff:fe49:470c%тест' Which is wrong. correct value is 'fe80::822a:a8ff:fe49:470c%Тест' so, IP-address is lowercased and zone id does not.
msg308326 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-12-14 17:57
In quick search the only RFC reference to this I found was https://tools.ietf.org/id/draft-sweet-uri-zoneid-01.html, which doesn't match what you are requesting (not that urlsplit's current behavior matches that either). Do you have RFC references?
msg308328 - (view) Author: Марк Коренберг (socketpair) * Date: 2017-12-14 18:41
https://url.spec.whatwg.org/#host-representation -> Support for <zone_id> is intentionally omitted. https://tools.ietf.org/html/rfc6874
msg308329 - (view) Author: Марк Коренберг (socketpair) * Date: 2017-12-14 18:43
Also this: http://potaroo.net/ietf/idref/draft-kitamura-ipv6-zoneid-free/ So, I'm confused. Will investigate.
msg308870 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-21 12:54
New changeset fdb148f949e3ae66036b75163ff68042d19cf0fc by Andrew Svetlov (Miss Islington (bot)) in branch '3.6': bpo-32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (GH-4867) (#4959) https://github.com/python/cpython/commit/fdb148f949e3ae66036b75163ff68042d19cf0fc
msg308871 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-21 12:58
RFC doesn't specify a case for Zone ID, let's keep it untouched (no lowercasing)
msg308886 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-12-21 17:19
I don't think a zone id in that form is actually valid in a URI, but I agree that not messing with whatever is there is probably the best policy as long as we aren't directly supporting whatever *is* valid.
History
Date User Action Args
2022-04-11 14:58:55 admin set github: 76504
2017-12-21 17:19:58 r.david.murray set messages: +
2017-12-21 12:58:46 asvetlov set status: open -> closedversions: - Python 3.8messages: + resolution: fixedstage: patch review -> resolved
2017-12-21 12:54:47 asvetlov set nosy: + asvetlovmessages: +
2017-12-21 12:16:29 python-dev set pull_requests: + <pull%5Frequest4850>
2017-12-14 18:43:31 socketpair set messages: +
2017-12-14 18:41:19 socketpair set messages: +
2017-12-14 17:57:38 r.david.murray set nosy: + r.david.murraymessages: +
2017-12-14 15:32:57 socketpair set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest4758>
2017-12-14 15:30:39 socketpair create