Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
fdb148f9
Kaydet (Commit)
fdb148f9
authored
Ara 21, 2017
tarafından
Miss Islington (bot)
Kaydeden (comit)
Andrew Svetlov
Ara 21, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (GH-4867) (#4959)
(cherry picked from commit
fbd60515
)
üst
45588c6d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
test_urlparse.py
Lib/test/test_urlparse.py
+9
-0
parse.py
Lib/urllib/parse.py
+6
-4
2017-12-14-10-10-10.bpo-32323.ideco.rst
...WS.d/next/Library/2017-12-14-10-10-10.bpo-32323.ideco.rst
+2
-0
No files found.
Lib/test/test_urlparse.py
Dosyayı görüntüle @
fdb148f9
...
...
@@ -520,6 +520,15 @@ class UrlParseTestCase(unittest.TestCase):
self
.
assertEqual
(
result
.
url
,
defrag
)
self
.
assertEqual
(
result
.
fragment
,
frag
)
def
test_urlsplit_scoped_IPv6
(
self
):
p
=
urllib
.
parse
.
urlsplit
(
'http://[FE80::822a:a8ff:fe49:470c
%
tESt]:1234'
)
self
.
assertEqual
(
p
.
hostname
,
"fe80::822a:a8ff:fe49:470c
%
tESt"
)
self
.
assertEqual
(
p
.
netloc
,
'[FE80::822a:a8ff:fe49:470c
%
tESt]:1234'
)
p
=
urllib
.
parse
.
urlsplit
(
b
'http://[FE80::822a:a8ff:fe49:470c
%
tESt]:1234'
)
self
.
assertEqual
(
p
.
hostname
,
b
"fe80::822a:a8ff:fe49:470c
%
tESt"
)
self
.
assertEqual
(
p
.
netloc
,
b
'[FE80::822a:a8ff:fe49:470c
%
tESt]:1234'
)
def
test_urlsplit_attributes
(
self
):
url
=
"HTTP://WWW.PYTHON.ORG/doc/#frag"
p
=
urllib
.
parse
.
urlsplit
(
url
)
...
...
Lib/urllib/parse.py
Dosyayı görüntüle @
fdb148f9
...
...
@@ -155,10 +155,12 @@ class _NetlocResultMixinBase(object):
def
hostname
(
self
):
hostname
=
self
.
_hostinfo
[
0
]
if
not
hostname
:
hostname
=
None
elif
hostname
is
not
None
:
hostname
=
hostname
.
lower
()
return
hostname
return
None
# Scoped IPv6 address may have zone info, which must not be lowercased
# like http://[fe80::822a:a8ff:fe49:470c%tESt]:1234/keys
separator
=
'
%
'
if
isinstance
(
hostname
,
str
)
else
b
'
%
'
hostname
,
percent
,
zone
=
hostname
.
partition
(
separator
)
return
hostname
.
lower
()
+
percent
+
zone
@property
def
port
(
self
):
...
...
Misc/NEWS.d/next/Library/2017-12-14-10-10-10.bpo-32323.ideco.rst
0 → 100644
Dosyayı görüntüle @
fdb148f9
:func:`urllib.parse.urlsplit()` does not convert zone-id (scope) to lower case
for scoped IPv6 addresses in hostnames now.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment