waterlink / rack-reverse-proxy

A Reverse Proxy for Rack
MIT License
196 stars 52 forks source link

Remove Accept-Encoding header #27

Closed maxilev closed 8 years ago

maxilev commented 8 years ago

We are using Heroku and we had similar issue mentioned here: https://github.com/waterlink/rack-reverse-proxy/issues/12.

The problem was that compression was applied twice: first time on proxied response and second time on original response. So I see two possible solutions: either decompress proxied response or do not send "Accept-Encoding" to proxy server. I used second solution, what do you think?

Closes #12

waterlink commented 8 years ago

You probably want to add :preserve_encoding to @global_options to provide an explicit default value (true or false, what it should be, WDYT?).

Additionally, could you please rebase against upstream master and add this option to the README?

Looks like the build errored randomly on Rubinius (sometimes it does segfaults, don't know why TBH).

waterlink commented 8 years ago

I have restarted the job for Rubinius, should work.

waterlink commented 8 years ago

Hmm, no it does not look like it is random, rubinius seems broken to me.

waterlink commented 8 years ago

Heh, even though it segfaulted on gem --version, travis still proceeded and test suite succeeded. That is weird.

waterlink commented 8 years ago

LGTM

@maxilev Thanks!

waterlink commented 8 years ago

@maxilev I have released 0.11.0 with your changes.

maxilev commented 8 years ago

Nice :+1: