fix the bug under new rack version >=1.4.1 #4

wants to merge 1 commit into


None yet

3 participants

fuying commented Feb 20, 2013

Rack version >=1.4.1 add BodyProxy to do thread lock, which need sham_rack to close the BodyProxy manually. I modified the net_http.rb file to fix the problem.

mdub commented Feb 26, 2013

Hi Fu Ying. Thanks for the pull request.

I would like a test, though, that demonstrates the bug under newer versions of Rack. Is it easy to reproduce?

FWIW, I've now got sham_rack's tests running against multiple versions of the rack gem, on Travis CI. See:

Also, I'm not comfortable with your Gemfile change, as I would like sham_rack to continue to be usable with older versions of rack. I suspect there's some way we can avoid requiring the new "Rack::BodyProxy" class, perhaps by using a respond_to? check, rather than instance_of?.

fuying commented Feb 28, 2013

Hi Mike. Very glad to see your reply.

The error we meet is come from the lock mechanism of new version rack. I haven't find the simple way to reproduce it. In our system, we use cucumber, httparty to call method in sham_rack. There are two request are sent out continuous, the first one will lock the thread which will make the second got an error about thread.

I will keep trying to reproduce it when I have time.

mdub commented Feb 21, 2016

Timeout expired.

@mdub mdub closed this Feb 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment