[openstack-dev] Http library usage by clients

Jay Pipes jaypipes at gmail.com
Thu Jun 27 15:39:17 UTC 2013


On 06/26/2013 12:55 PM, Adam Young wrote:
> Glance:
> - Uses httplib for communication
> - Uses keystoneclient within cli
> - Checks that socket is patched before importing eventlet for httplib.

For the record, Glance uses httplib, not httplib2, for its 
request/response handling because httplib2 does not support 
chunked-transfer encoding. This is the same reason that Swift's client 
and server communication uses the httplib library over httplib2 -- it's 
kind of important when you have multi-GB file transfers ;)

I note that the requests library supports chunked transfer:

http://docs.python-requests.org/en/latest/user/advanced.html#chunk-encoded-requests

Might be time for the Glance developers to consider switching out 
httplib for requests?

I noticed that the original email did not include Swift. Is there a 
reason for not including it?

All the best,
-jay




More information about the OpenStack-dev mailing list