4 ms·
By the way, I found a bug in httplib where, when sending a request body, if the peer closes the socket early with an error (HTTP/1.1 compliant behavior), the re
by ak217 14y ago
By the way, I found a bug in httplib where, when sending a request body, if the peer closes the socket early with an error (HTTP/1.1 compliant behavior), the request will time out instead of returning the correct error information. To my knowledge, this is also present in httplib2. This is because the socket write in both libraries is blocking (which seems simply wrong). I'm hoping to send a patch sometime soon.
Regardless, httplib2 seems to have lots of other technical advantages over httplib - have you considered using it?
- kenneth_reitz 14y agohttp://code.google.com/p/httplib2/source/browse/python2/httplib2/__init__.py#1598 http://code.google.com/p/httplib2/source/browse/python2/http... The entire process of sending a Request is wrapped in a 'try/except Exception' block. wtf. It also just aimlessly retries failed requests. This is not configurable. Httplib2 is terrible. I actually created Requests partially in spite of it.
- ak217 14y agoMakes sense, thanks. I'll have to work on patching up httplib, then.
- RyanMcGreal 14y agohttplib2 is not thread-safe. That pretty much makes it a deal-breaker, even if the API is a significant improvement over the standard library (though not over requests).