You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the event the user receives an incomplete response when using urllib2
(and urllib), the library should raise an error to indicate the response
is incomplete. This is a matter of checking if the Content-Length
defined in the header matches the size of the retrieved response. While
this can be done by the user, an exception will help alert the more
unwitting, such as myself, by failing early.
urllib and urllib2, by definition, returns a file-like object which
provides a variety of facilities, most common one being a reading the
object to get the content.
What you are asking for is, to read the content, verify if it matches
the Content-Length header, and raise an exception, if the there is a
mis-match. This facility may not be good idea to implement in library,
while it can be (and should be) taken care by the client which is
using the obj.
I am -1 on this request and would like to close this as 'wont-fix'.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: