Issue 10817: urllib.request.urlretrieve never raises ContentTooShortError if no reporthook (original ) (raw )Created on 2011-01-03 15:50 by RC , last changed 2022-04-11 14:57 by admin . This issue is now closed .
Messages (7)
msg125186 - (view)
Author: Robert Cheng (RC)
Date: 2011-01-03 15:50
When reporthook is None, size variable is not computed and defaulted to -1. Thus, without reporthook, ContentTooShortError is not raised even when Content-Length header is supplied and download size is less than expected amount, contrary to the documentation.
msg145807 - (view)
Author: Jyrki Pulliainen (nailor) *
Date: 2011-10-18 13:26
Changed the code so that the content length is set as size if reporthook is not set and wrote two tests for it. Note: I moved fakehttp behavior to a mixin, so that it's more reusable.
msg145826 - (view)
Author: Jyrki Pulliainen (nailor) *
Date: 2011-10-18 16:02
I had a bad patch, containing changes to locale.py, so I've uploaded a new patch for this.
msg146721 - (view)
Author: Roundup Robot (python-dev)
Date: 2011-10-31 17:40
New changeset 2ca415cbf2ac by Senthil Kumaran in branch '3.2': Fix issue 10817 - Fix urlretrieve function to raise ContentTooShortError http://hg.python.org/cpython/rev/2ca415cbf2ac New changeset e3e5b6f03f79 by Senthil Kumaran in branch 'default': merge from 3.2 - Fix issue 10817 - Fix urlretrieve function to raise ContentTooShortError http://hg.python.org/cpython/rev/e3e5b6f03f79
msg146726 - (view)
Author: Roundup Robot (python-dev)
Date: 2011-10-31 18:45
New changeset 1ef30d6429db by Senthil Kumaran in branch '2.7': Port to 2.7 - issue 10817 - Fix urlretrieve function to raise http://hg.python.org/cpython/rev/1ef30d6429db
msg146727 - (view)
Author: Senthil Kumaran (orsenthil) *
Date: 2011-10-31 18:46
This is fixed in all codelines. Thanks for your contribution, Jyrki Pulliainen.
msg146728 - (view)
Author: Jyrki Pulliainen (nailor) *
Date: 2011-10-31 18:48
Cheers, thank you for commiting!
History
Date
User
Action
Args
2022-04-11 14:57:10
admin
set
github: 55026
2011-10-31 18:48:41
nailor
set
messages: +
2011-10-31 18:46:31
orsenthil
set
status: open -> closedresolution: fixedmessages: + versions: + Python 3.2, Python 3.3
2011-10-31 18:45:24
python-dev
set
messages: +
2011-10-31 17:40:15
python-dev
set
nosy: + python-dev messages: +
2011-10-18 16:02:39
nailor
set
files: - issue10817.patch
2011-10-18 16:02:23
nailor
set
files: + issue10817.patch messages: +
2011-10-18 13:26:59
nailor
set
files: + issue10817.patch nosy: + nailor messages: + keywords: + patch
2011-01-15 00:10:47
siemer
set
nosy: + siemer
2011-01-03 15:53:07
orsenthil
set
assignee: orsenthil nosy: + orsenthil
2011-01-03 15:50:00
RC
create