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
f25e35b9
Kaydet (Commit)
f25e35b9
authored
Tem 27, 2007
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #978833: Close https sockets by releasing the _ssl object.
üst
ec2ce9bb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
httplib.py
Lib/httplib.py
+3
-0
socket.py
Lib/socket.py
+4
-0
test_socket_ssl.py
Lib/test/test_socket_ssl.py
+19
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/httplib.py
Dosyayı görüntüle @
f25e35b9
...
...
@@ -1117,6 +1117,9 @@ class FakeSocket(SharedSocketClient):
def
__getattr__
(
self
,
attr
):
return
getattr
(
self
.
_sock
,
attr
)
def
close
(
self
):
SharedSocketClient
.
close
(
self
)
self
.
_ssl
=
None
class
HTTPSConnection
(
HTTPConnection
):
"This class allows communication via SSL."
...
...
Lib/socket.py
Dosyayı görüntüle @
f25e35b9
...
...
@@ -144,6 +144,10 @@ class _closedsocket(object):
send
=
recv
=
recv_into
=
sendto
=
recvfrom
=
recvfrom_into
=
_dummy
__getattr__
=
_dummy
# Wrapper around platform socket objects. This implements
# a platform-independent dup() functionality. The
# implementation currently relies on reference counting
# to close the underlying socket object.
class
_socketobject
(
object
):
__doc__
=
_realsocket
.
__doc__
...
...
Lib/test/test_socket_ssl.py
Dosyayı görüntüle @
f25e35b9
...
...
@@ -106,6 +106,25 @@ class BasicTests(unittest.TestCase):
connector
()
t
.
join
()
def
test_978833
(
self
):
if
test_support
.
verbose
:
print
"test_978833 ..."
import
os
,
httplib
with
test_support
.
transient_internet
():
s
=
socket
.
socket
(
socket
.
AF_INET
)
s
.
connect
((
"www.sf.net"
,
443
))
fd
=
s
.
_sock
.
fileno
()
sock
=
httplib
.
FakeSocket
(
s
,
socket
.
ssl
(
s
))
s
=
None
sock
.
close
()
try
:
os
.
fstat
(
fd
)
except
OSError
:
pass
else
:
raise
test_support
.
TestFailed
(
"Failed to close socket"
)
class
OpenSSLTests
(
unittest
.
TestCase
):
def
testBasic
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
f25e35b9
...
...
@@ -238,6 +238,8 @@ Core and builtins
Library
-------
- Bug #978833: Close https sockets by releasing the _ssl object.
- Change location of the package index to pypi.python.org/pypi
- Bug #1701409: Fix a segfault in printing ctypes.c_char_p and
...
...
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