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
{{ message }}
Repository navigation
httplib: allowing stream-type body part in requests #41165
httplib2.patch: httplib: allowing stream-type body part in requests
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:
assignee=Noneclosed_at=<Date2006-11-12.10:33:12.000>created_at=<Date2004-11-12.15:48:57.000>labels= ['extension-modules']
title='httplib: allowing stream-type body part in requests'updated_at=<Date2006-11-12.10:33:12.000>user='https://bugs.python.org/alienlifeform'
The attached patch makes it possible to use a file-like
object in httplib requests (useful to PUT large files
without exhausting the machine memory - think a DAV
server).
The supplied object must be able to read().
If Content-Length support is desired, the body object
must either have a __length__ method (so len(body)
works) OR have a stat-able "name" property (file
objects are in the second category).
Activity
alienlifeform commentedon Nov 12, 2004
Greetings.
The attached patch makes it possible to use a file-like
object in httplib requests (useful to PUT large files
without exhausting the machine memory - think a DAV
server).
The supplied object must be able to read().
If Content-Length support is desired, the body object
must either have a __length__ method (so len(body)
works) OR have a stat-able "name" property (file
objects are in the second category).
Having applied this patch the following works:
Opening in 'rb' mode - on windoze - is important for
this to work, or the content length header will be
wrong, which is probably BAD.
Alessandro Forghieri
loewis commentedon Nov 12, 2006
Logged In: YES
user_id=21627
Thanks for the patch. Committed (with modifications) as r52736.