[issue4308] repr of httplib.IncompleteRead is stupid

2008-11-12 Thread Chris Withers

New submission from Chris Withers <[EMAIL PROTECTED]>:

The repr of httplib.IncompleteRead contains all the data in the read so far.

This is stupid. Consider the download of a 100Mb file which fails after
30Mb. You end up with 90Mb of text in the log entry logged with the
python logging framework 
(eg: logger.error('Something bad happened',exc_info=True) )

--
components: Library (Lib)
messages: 75789
nosy: cjw296
severity: normal
status: open
title: repr of httplib.IncompleteRead is stupid
type: resource usage
versions: Python 2.5, Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2008-11-12 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Would you like to work on a patch?

--
nosy: +benjamin.peterson
priority:  -> normal
stage:  -> needs patch
versions: +Python 2.7, Python 3.1 -Python 2.5, Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2008-11-12 Thread Chris Withers

Chris Withers <[EMAIL PROTECTED]> added the comment:

Please find attached a patch against the trunk.
I'd really appreciate it if this could get merged to the 2.5 and 2.6
branches too, in case of a future release there.

--
keywords: +patch
versions: +Python 2.5, Python 2.6
Added file: http://bugs.python.org/file11998/incompleteread.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro

Skip Montanaro  added the comment:

Can't be applied to 2.5 at this point.  I agree it's dumb to
report the entire partial read and that reporting just the
number of bytes read is a much better solution.  Your patch
looks fine to me as well, except you call resp.close() twice
in test_incomplete_read().  Assigning to Benjamin for
application.  (He's going to get the merge stuff right. I
almost certainly will not.)

--
assignee:  -> benjamin.peterson
nosy: +skip.montanaro
versions: +Python 3.0 -Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro

Changes by Skip Montanaro :


--
stage: needs patch -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Chris Withers

Chris Withers  added the comment:

Why can't it be applied to 2.5?

No problem with the 2nd resp.close() being removed...

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

The Python 2.5 branch is closed for bug fixes; no further bug fix
releases of Python 2.5 will be made. Only security fixes can be accepted
on the 2.5 branch.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro

Skip Montanaro  added the comment:

Chris> Why can't it be applied to 2.5?

Benjamin can correct me if I'm wrong, but I thought the last 2.5 release was
the last full release planned.  Certainly if another full 2.5 release is in
the cards then the patch should go there as well.

Skip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro

Skip Montanaro  added the comment:

Martin> The Python 2.5 branch is closed for bug fixes; no further bug
Martin> fix releases of Python 2.5 will be made. Only security fixes can
Martin> be accepted on the 2.5 branch.

So all Chris has to do to get this applied to 2.5 is craft an exploit based
on the current behavior, right? ;-)

S

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> So all Chris has to do to get this applied to 2.5 is craft an exploit based
> on the current behavior, right? ;-)

Right :-) Of course, security patches should see a much more careful
review than regular bug fixes.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Applied with a few tweaks in r70107.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com