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
7c75c99a
Kaydet (Commit)
7c75c99a
authored
Haz 28, 2002
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify HTTPSConnection constructor.
See discussion in SF bug 458463.
üst
13f99d70
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
httplib.py
Lib/httplib.py
+7
-21
No files found.
Lib/httplib.py
Dosyayı görüntüle @
7c75c99a
...
@@ -78,10 +78,10 @@ except ImportError:
...
@@ -78,10 +78,10 @@ except ImportError:
__all__
=
[
"HTTP"
,
"HTTPResponse"
,
"HTTPConnection"
,
"HTTPSConnection"
,
__all__
=
[
"HTTP"
,
"HTTPResponse"
,
"HTTPConnection"
,
"HTTPSConnection"
,
"HTTPException"
,
"NotConnected"
,
"UnknownProtocol"
,
"HTTPException"
,
"NotConnected"
,
"UnknownProtocol"
,
"UnknownTransferEncoding"
,
"
IllegalKeywordArgument
"
,
"UnknownTransferEncoding"
,
"
UnimplementedFileMode
"
,
"
UnimplementedFileMode"
,
"IncompleteRead"
,
"InvalidURL
"
,
"
IncompleteRead"
,
"InvalidURL"
,
"ImproperConnectionState
"
,
"
ImproperConnectionState"
,
"CannotSendRequest"
,
"CannotSendHeader
"
,
"
CannotSendRequest"
,
"CannotSendHeader"
,
"ResponseNotReady
"
,
"
ResponseNotReady"
,
"
BadStatusLine"
,
"error"
]
"BadStatusLine"
,
"error"
]
HTTP_PORT
=
80
HTTP_PORT
=
80
HTTPS_PORT
=
443
HTTPS_PORT
=
443
...
@@ -733,21 +733,10 @@ class HTTPSConnection(HTTPConnection):
...
@@ -733,21 +733,10 @@ class HTTPSConnection(HTTPConnection):
default_port
=
HTTPS_PORT
default_port
=
HTTPS_PORT
def
__init__
(
self
,
host
,
port
=
None
,
**
x509
):
def
__init__
(
self
,
host
,
port
=
None
,
key_file
=
None
,
cert_file
=
None
):
keys
=
x509
.
keys
()
try
:
keys
.
remove
(
'key_file'
)
except
ValueError
:
pass
try
:
keys
.
remove
(
'cert_file'
)
except
ValueError
:
pass
if
keys
:
raise
IllegalKeywordArgument
()
HTTPConnection
.
__init__
(
self
,
host
,
port
)
HTTPConnection
.
__init__
(
self
,
host
,
port
)
self
.
key_file
=
x509
.
get
(
'key_file'
)
self
.
key_file
=
key_file
self
.
cert_file
=
x509
.
get
(
'cert_file'
)
self
.
cert_file
=
cert_file
def
connect
(
self
):
def
connect
(
self
):
"Connect to a host on a given (SSL) port."
"Connect to a host on a given (SSL) port."
...
@@ -891,9 +880,6 @@ class UnknownProtocol(HTTPException):
...
@@ -891,9 +880,6 @@ class UnknownProtocol(HTTPException):
class
UnknownTransferEncoding
(
HTTPException
):
class
UnknownTransferEncoding
(
HTTPException
):
pass
pass
class
IllegalKeywordArgument
(
HTTPException
):
pass
class
UnimplementedFileMode
(
HTTPException
):
class
UnimplementedFileMode
(
HTTPException
):
pass
pass
...
...
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