msg75789 - (view) |
Author: Chris Withers (cjw296) *  |
Date: 2008-11-12 16:41 |
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) ) |
|
|
msg75796 - (view) |
Author: Benjamin Peterson (benjamin.peterson) *  |
Date: 2008-11-12 21:20 |
Would you like to work on a patch? |
|
|
msg75814 - (view) |
Author: Chris Withers (cjw296) *  |
Date: 2008-11-13 07:19 |
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. |
|
|
msg83023 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
Date: 2009-03-02 16:34 |
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.) |
|
|
msg83024 - (view) |
Author: Chris Withers (cjw296) *  |
Date: 2009-03-02 16:54 |
Why can't it be applied to 2.5? No problem with the 2nd resp.close() being removed... |
|
|
msg83026 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2009-03-02 17:53 |
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. |
|
|
msg83030 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
Date: 2009-03-02 18:34 |
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 |
|
|
msg83031 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
Date: 2009-03-02 18:37 |
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 |
|
|
msg83034 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2009-03-02 19:53 |
> 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. |
|
|
msg83043 - (view) |
Author: Benjamin Peterson (benjamin.peterson) *  |
Date: 2009-03-02 22:42 |
Applied with a few tweaks in r70107. |
|
|