Closed jjb closed 7 years ago
Oh, that is a quite interesting bug here. How do you think we should test it?
I don't have ideas for how to test. Looks like all your tests are at least "one level" away from a "real" http response test. we would maybe need to set up a new type of test where a little rack webserver were run.
The fix clearly brings the code back into the rack spec though. The third element in the array needs to be able to respond to each
. ruby strings responded to each (mixed in Enumerable) until 1.9, so maybe that's the history of a simple string being used as the third element.
see:
I'm also wondering why no tests failed when this change has been introduced. This effectively means that the line under the question is not tested.
It would be amazing to set up some sort of integration test, where we run 2 servers: proxy and the one being proxied.
sounds cool, but I don't have time to do that. if this were my engineering organization i would insist that we set that up before moving forward, but since this is a library with a bug maybe we can merge this and then make another TODO ticket for setting up that layer of testing? ππΌπ
@jjb Sounds reasonable!
see also https://github.com/waterlink/rack-reverse-proxy/issues/36