We ran into this when updating some tests that use the
ey_services_fake gem which internally relies on Rack::Client. This
was ending up making a call that went through the Rack::Lock
middleware, and then would hang on any second request because the
Rack::BodyProxy that was holding a lock never properly closed out once
Rack::Client::Response replaced the body.
In more recent versions of Rack, if the body provides a
#close
method, that is expected to be called after iteration over the contents of the body. (See https://github.com/rack/rack/blob/ed9050876dfa2418613db05fb52015dc97cb78fb/SPEC#L250-L252 for the relevant section of the spec).We ran into this when updating some tests that use the
ey_services_fake
gem which internally relies onRack::Client
. This was ending up making a call that went through theRack::Lock
middleware, and then would hang on any second request because theRack::BodyProxy
that was holding a lock never properly closed out onceRack::Client::Response
replaced the body.