jaswope/rack-reverse-proxy — pull request #45 by janraasch (2014-09-18 14:32:52+00:00)
Title: Fix response headers

Since `HttpStreamingResponse#headers` returns a `Hash` with `Array`-keys,
e.g.

```ruby
{"cache-control"=>["max-age=300, public"]}
```

we need to normalise this to something like

```ruby
{"cache-control"=> "max-age=300, public"}
```

in order to **not break other middlewares** processing the headers further down the pipe.

In our case we encountered a problem when working with `rack-wwwhisper`,
see `Rack::WWWhisper::NoPublicCache#call` (https://github.com/wrr/rack-wwwhisper),
since it is calling `gsub` on the 'Cache-Control' header.

While at it, I reused some more methods of the `rack-proxy` gem.