Skip to content

Net:HTTP adapter tries to close connection two times and throws error #178

Merged
merged 1 commit into from Jul 23, 2012

2 participants

@HendrikW

If the Net:HTTP adapter sends a request (opening and closing a HTTP session) and the server's response includes a "Connection: close" header then Net:HTTP will try to close the connection again, resulting in a "Net::HTTP::Persistent::Error: too many connection resets (due to HTTP session not yet started)".

@HendrikW HendrikW called start_with_request without a block, because as Net:HTTP's star…
…t method description says, it will open AND close a connection if start is called with a block. In this case Net:HTTP then later tries to close that same connection again if the server's response has "Connection: close" in its header. In that case Net:HTTP will throw an IOError.
aaa5bf2
@bblimke
Owner

This block probably shouldn't be there, but I'd like to reproduce this problem, before fixing it.

Are you able to provide an example of a failing spec? I tried to add "Connection: close" to WebMockServer but all specs pass anyway.

Unfortunately I won't get to that this week, but I'll definitely see that I come up with a failing spec sometime next week.

@bblimke
Owner
bblimke commented May 21, 2012

Did you get a chance to write this failing spec?

@bblimke bblimke merged commit 36aff46 into bblimke:master Jul 23, 2012
@bblimke
Owner
bblimke commented Jul 23, 2012

I had to revert it. This breaks some other scenarios.

@bblimke bblimke added a commit that referenced this pull request Jul 23, 2012
@bblimke Revert "Merge pull request #178 from HendrikW/master"
This reverts commit 36aff46, reversing
changes made to 1e61a8c.
574cd18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.