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
c97f5ede
Kaydet (Commit)
c97f5ede
authored
Ara 17, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.
Original patch by Simon Sapin.
üst
ea76e87c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
1 deletion
+7
-1
httplib.py
Lib/httplib.py
+1
-1
test_httplib.py
Lib/test/test_httplib.py
+2
-0
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/httplib.py
Dosyayı görüntüle @
c97f5ede
...
@@ -565,7 +565,7 @@ class HTTPResponse:
...
@@ -565,7 +565,7 @@ class HTTPResponse:
# connection, and the user is reading more bytes than will be provided
# connection, and the user is reading more bytes than will be provided
# (for example, reading in 1k chunks)
# (for example, reading in 1k chunks)
s
=
self
.
fp
.
read
(
amt
)
s
=
self
.
fp
.
read
(
amt
)
if
not
s
:
if
not
s
and
amt
:
# Ideally, we would raise IncompleteRead if the content-length
# Ideally, we would raise IncompleteRead if the content-length
# wasn't satisfied, but it might break compatibility.
# wasn't satisfied, but it might break compatibility.
self
.
close
()
self
.
close
()
...
...
Lib/test/test_httplib.py
Dosyayı görüntüle @
c97f5ede
...
@@ -153,6 +153,8 @@ class BasicTest(TestCase):
...
@@ -153,6 +153,8 @@ class BasicTest(TestCase):
sock
=
FakeSocket
(
body
)
sock
=
FakeSocket
(
body
)
resp
=
httplib
.
HTTPResponse
(
sock
)
resp
=
httplib
.
HTTPResponse
(
sock
)
resp
.
begin
()
resp
.
begin
()
self
.
assertEqual
(
resp
.
read
(
0
),
''
)
# Issue #20007
self
.
assertFalse
(
resp
.
isclosed
())
self
.
assertEqual
(
resp
.
read
(),
'Text'
)
self
.
assertEqual
(
resp
.
read
(),
'Text'
)
self
.
assertTrue
(
resp
.
isclosed
())
self
.
assertTrue
(
resp
.
isclosed
())
...
...
Misc/ACKS
Dosyayı görüntüle @
c97f5ede
...
@@ -904,6 +904,7 @@ George Sakkis
...
@@ -904,6 +904,7 @@ George Sakkis
Rich Salz
Rich Salz
Kevin Samborn
Kevin Samborn
Ilya Sandler
Ilya Sandler
Simon Sapin
Mark Sapiro
Mark Sapiro
Ty Sarna
Ty Sarna
Hugh Sasse
Hugh Sasse
...
...
Misc/NEWS
Dosyayı görüntüle @
c97f5ede
...
@@ -27,6 +27,9 @@ Core and Builtins
...
@@ -27,6 +27,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.
Original patch by Simon Sapin.
- Issue #19912: Fixed numerous bugs in ntpath.splitunc().
- Issue #19912: Fixed numerous bugs in ntpath.splitunc().
- Issue #19623: Fixed writing to unseekable files in the aifc module.
- Issue #19623: Fixed writing to unseekable files in the aifc module.
...
...
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