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
531cebad
Kaydet (Commit)
531cebad
authored
Ock 21, 2006
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #902075: urllib2 now handles "host:port" proxy specifications
Can/should this be backported?
üst
3d563509
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
urllib2.py
Lib/urllib2.py
+13
-8
NEWS
Misc/NEWS
+3
-1
No files found.
Lib/urllib2.py
Dosyayı görüntüle @
531cebad
...
...
@@ -579,14 +579,19 @@ class ProxyHandler(BaseHandler):
def
proxy_open
(
self
,
req
,
proxy
,
type
):
orig_type
=
req
.
get_type
()
type
,
r_type
=
splittype
(
proxy
)
host
,
XXX
=
splithost
(
r_type
)
if
'@'
in
host
:
user_pass
,
host
=
host
.
split
(
'@'
,
1
)
if
':'
in
user_pass
:
user
,
password
=
user_pass
.
split
(
':'
,
1
)
user_pass
=
base64
.
encodestring
(
'
%
s:
%
s'
%
(
unquote
(
user
),
unquote
(
password
)))
.
strip
()
req
.
add_header
(
'Proxy-authorization'
,
'Basic '
+
user_pass
)
if
not
type
or
r_type
.
isdigit
():
# proxy is specified without protocol
type
=
orig_type
host
=
proxy
else
:
host
,
r_host
=
splithost
(
r_type
)
user_pass
,
host
=
splituser
(
host
)
user
,
password
=
splitpasswd
(
user_pass
)
if
user
and
password
:
user
,
password
=
user_pass
.
split
(
':'
,
1
)
user_pass
=
base64
.
encodestring
(
'
%
s:
%
s'
%
(
unquote
(
user
),
unquote
(
password
)))
.
strip
()
req
.
add_header
(
'Proxy-authorization'
,
'Basic '
+
user_pass
)
host
=
unquote
(
host
)
req
.
set_proxy
(
host
,
type
)
if
orig_type
==
type
:
...
...
Misc/NEWS
Dosyayı görüntüle @
531cebad
...
...
@@ -337,7 +337,9 @@ Extension Modules
Library
-------
- Bug #1407902: Added support for sftp:// URIs to urlparse.
- Bug #902075: urllib2 now supports '
host
:
port
' style proxy specifications.
- Bug #1407902: Add support for sftp:// URIs to urlparse.
- Bug #1371247: Update Windows locale identifiers in locale.py.
...
...
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