ncr/rack-proxy — pull request #29 by sdhull (2013-11-14 01:51:13+00:00)
Title: Set headers propery for non-streaming requests

I'm not exactly sure why `streaming` is default -- it seems to cause strange errors in different environments for me, and is fully incompatible with WebMock and VCR (as noted in the readme). However, non-streaming requests work fine with WebMock and VCR.

As a result, I've recently begun setting `streaming = false`, but then I found that non-streaming responses don't respond to the `headers` method, meaning all headers from the response are essentially dropped (and not proxied).

If you [check out the net/http](http://ruby-doc.org/stdlib-2.0.0/libdoc/net/http/rdoc/Net/HTTP.html#label-Response+Data) docs, it's clear that `to_hash` is the intended method for attaining headers.

I've included a test that fails if you change the proxy.rb request back to what it was before.