gesomax / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

Http.Request() does not support iterated bodies #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Related:
http://code.google.com/p/httplib2/issues/detail?id=25

Http objects do not support httplib's putrequest() and send(), which means
that iterative support can not even be easily added. (Httplib does not
support iterator file bodies, but it appears that it is possible to add it
with send()).

Thus, a significant number of parallel uploads, or a single large upload,
would consume all memory. Strangely, this seems to be a low priority for
most http libraries, and I believe urllib and urllib2 have a similar
limitation.

This has an impact in several key USE cases for this library:
1) server-based file uploader (i.e., S3)
2) server-based proxies
3) large file uploads (i.e., larger than RAM)

For now, the workaround seems to be to use raw httplib for PUTs and POSTs,
but I haven't tested to yet see if it supports multiple send() requests.

Original issue reported on code.google.com by jamiesonbecker@gmail.com on 2 Dec 2008 at 7:07

GoogleCodeExporter commented 8 years ago
Given the structure of httplib2 that would be a large change and would require a
large re-write. Eventually I would like to rewrite httplib2 not to rely on 
httplib,
and at that time this change should be added.

Original comment by joe.gregorio@gmail.com on 16 Jul 2009 at 4:48

GoogleCodeExporter commented 8 years ago

Original comment by joe.gregorio@gmail.com on 26 Dec 2009 at 5:09