Re: [Httplib2-discuss] Need to specify IP address for client socket (or provide custom HTTPConnecti
Status: Beta
Brought to you by:
jcgregorio
From: Joe G. <jo...@bi...> - 2007-07-30 14:14:35
|
On 7/30/07, Simon Willison <si...@si...> wrote: > Unfortunately httplib2 doesn't currently provide a hook for > substituting in a custom HTTPConnection implementation - it is hard > coded to pick between HTTPConnectionWithTimeout and > HTTPSConnectionWithTimeout. It would be really useful if there was a > way to provide a custom HTTPConnection - in my case, I'd provide one > that knows how to bind to a specified client socket IP address. > Alternatively, adding direct support for my use case to the httplib2 > library would be useful. That use case is a little too obscure even for me to think we should add something to the library to support it directly (and I'm the guy that added HMACDigest support!). On the other hand, adding support for a way to provide a custom HTTPConnection sounds like a great idea. It should even be useful in creating unit tests instead of monkey patching httplib. It was also fairly easy to implement and test. This is now available on the trunk. Thanks, -joe -- Joe Gregorio http://bitworking.org |