classification
Title: Update HTTPRespnse.length
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: jhylton Nosy List: akuchling, irmen, jhylton, jjlee, jpe
Priority: normal Keywords: patch

Created on 2004-07-10 21:16 by jpe, last changed 2004-11-07 16:15 by jhylton. This issue is now closed.

Files
File name Uploaded Description Edit
response-len.diff jpe, 2004-07-10 21:16 Update length correctly
Messages (6)
msg46341 - (view) Author: John Ehresman (jpe) * Date: 2004-07-10 21:16
Update length attribute correctly when read() returns
less than the expected number of bytes.  Addresses bug
# 988120 
msg46342 - (view) Author: John J Lee (jjlee) Date: 2004-07-10 22:36
Logged In: YES 
user_id=261020

Patch basically looks good, but I'm worrying about the bit
of code in the current httplib.py, in the block commented
with '# unbounded read'.

Why the switch on .will_close?  Shouldn't the switch be on
(self.length is None), instead?  I could well be missing
something, but this looks like another bug of the same kind
as in the original report.

Also, how about the various .readline() calls?  Might they
also return less than a full line?
msg46343 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-08-07 20:59
Logged In: YES 
user_id=11375

Jeremy, you know about HTTP stuff, right?
msg46344 - (view) Author: Jeremy Hylton (jhylton) Date: 2004-09-02 13:15
Logged In: YES 
user_id=31392

I will take a look.
msg46345 - (view) Author: Irmen de Jong (irmen) Date: 2004-11-07 15:28
Logged In: YES 
user_id=129426

slightly improved patch is at 1061941
msg46346 - (view) Author: Jeremy Hylton (jhylton) Date: 2004-11-07 16:15
Logged In: YES 
user_id=31392

Applied patch 1061941; fixed in httplib.py 1.94
History
Date User Action Args
2004-07-10 21:16:09jpecreate