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
a7712090
Kaydet (Commit)
a7712090
authored
Şub 01, 2008
tarafından
Bill Janssen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix bug 1482: IMAP4 SSL isn't working
üst
db0a9b37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
50 deletions
+5
-50
imaplib.py
Lib/imaplib.py
+5
-50
No files found.
Lib/imaplib.py
Dosyayı görüntüle @
a7712090
...
...
@@ -1145,55 +1145,10 @@ else:
"""
self
.
host
=
host
self
.
port
=
port
self
.
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
sock
.
connect
((
host
,
port
))
self
.
sslobj
=
ssl
.
wrap_socket
(
self
.
sock
,
self
.
keyfile
,
self
.
certfile
)
def
read
(
self
,
size
):
"""Read 'size' bytes from remote."""
# sslobj.read() sometimes returns < size bytes
chunks
=
[]
read
=
0
while
read
<
size
:
data
=
self
.
sslobj
.
read
(
size
-
read
)
read
+=
len
(
data
)
chunks
.
append
(
data
)
return
''
.
join
(
chunks
)
def
readline
(
self
):
"""Read line from remote."""
line
=
[]
while
1
:
char
=
self
.
sslobj
.
read
(
1
)
line
.
append
(
char
)
if
char
==
"
\n
"
:
return
''
.
join
(
line
)
def
send
(
self
,
data
):
"""Send data to remote."""
bytes
=
len
(
data
)
while
bytes
>
0
:
sent
=
self
.
sslobj
.
write
(
data
)
if
sent
==
bytes
:
break
# avoid copy
data
=
data
[
sent
:]
bytes
=
bytes
-
sent
def
shutdown
(
self
):
"""Close I/O established in "open"."""
self
.
sock
.
close
()
def
socket
(
self
):
"""Return socket instance used to connect to IMAP4 server.
socket = <instance>.socket()
"""
return
self
.
sock
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
sock
.
connect
((
host
,
port
))
self
.
sock
=
ssl
.
wrap_socket
(
sock
,
self
.
keyfile
,
self
.
certfile
)
self
.
file
=
self
.
sock
.
makefile
(
'rb'
)
def
ssl
(
self
):
...
...
@@ -1201,7 +1156,7 @@ else:
ssl = ssl.wrap_socket(<instance>.socket)
"""
return
self
.
s
slobj
return
self
.
s
ock
__all__
.
append
(
"IMAP4_SSL"
)
...
...
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