conversation/raca — pull request #1 by yob (2014-04-21 00:36:05+00:00)
Title: Fix our 408 timeout errors!!111!!111

If loaded with rails, raca caches the auth token in the rails cache to avoid
hitting the identity API each time a new Raca::Account is instantiated. That
token expires evry 24 hours, so one request per day will return 401 Unauthorised.
When that happens, raca tries to silently re-authenticate to get a new token
and then silently retry the original request.

In 0.3.1 and below, if the request that triggered the 401 was a
HttpClient#streaming_put, the re-auth would work but re-trying the original
request would return a 408 Timeout from rackspace.

It turns out the ruby Net:HttpRequest object cannot be re-used if the
body_stream attribute has been set. The re-try request must use a brand new
Net::HttpRequest object.

For more details on the specific fix, check this commit cb14124