Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Fix em_http_request adapter for correct timeout+request handling

em-http-request allows you to send multiple requests on the same
EM::HTTPConnection object, which is mostly useful for pipelining.  If the
underlying TCP connection drops, it will be re-established if another
request is made on the same connection object.

In testing that a user of em-http-request correctly dealt with timeouts (by
retrying the request on the same connection object), it was discovered that
webmock does not correctly emulate the real-world behaviour of
em-http-request, and the parsed response data was being sent to the wrong
`EM::HTTPClient` instance.  This commit provides a failing test case (along
with a test case that succeeded already, to ensure the basic behaviour
continues to work in the future), along with a small change to the adapter
code to correctly handle the change in clients after a timeout.
latest commit 48946458fc
@mpalmer mpalmer authored
..
Failed to load latest commit information.
curb Convert specs to RSpec 2.99.2 syntax with Transpec
em_http_request Fix em_http_request adapter for correct timeout+request handling
excon Convert specs to RSpec 2.99.2 syntax with Transpec
http_rb Update http.rb adapter
httpclient Convert specs to RSpec 2.99.2 syntax with Transpec
net_http Convert specs to RSpec 2.99.2 syntax with Transpec
patron Convert specs to RSpec 2.99.2 syntax with Transpec
shared Convert specs to RSpec 2.99.2 syntax with Transpec
typhoeus Convert specs to RSpec 2.99.2 syntax with Transpec
webmock_shared.rb
Something went wrong with that request. Please try again.