ncr / rack-proxy

A request/response rewriting HTTP proxy. A Rack app.
MIT License
269 stars 94 forks source link

Fix incorrect header serialization in streamed responses #73

Closed voikya closed 6 years ago

voikya commented 6 years ago

Fixes an incorrect header serialization in streamed responses (when @streaming is true); the return value from HttpStreamingResponse.headers consists of arrays of strings rather than plain strings, which in turn causes Rack to fail.

Since Rack::Proxy already has a helper to normalize this, this change ensures it always gets called.

This resolves issue #65 .

joevandyk commented 6 years ago

@ncr can this get merged?

ncr commented 6 years ago

I’ll release a new gem tomorrow. If not, ping me please :)

joevandyk commented 6 years ago

Awesome, thanks! Just ran into a problem where I was POSTing to a rack-proxy URL that had streaming enabled, and the browser was downloading the response as a file. Turning streaming off fixed the issue. I'm assuming this PR fixes the problem?

ncr commented 6 years ago

Not sure to be honest, can you check it? I don't use rack-proxy these days, just merging PRs :)

pon., 26 mar 2018 o 22:12 użytkownik Joe Van Dyk notifications@github.com napisał:

Awesome, thanks! Just ran into a problem where I was POSTing to a rack-proxy URL that had streaming enabled, and the browser was downloading the response as a file. Turning streaming off fixed the issue. I'm assuming this PR fixes the problem?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/ncr/rack-proxy/pull/73#issuecomment-376296039, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAWpKdt_rhdMdra9bdWQDqnTvTLpVx0ks5tiUuYgaJpZM4SnGDa .

voikya commented 6 years ago

@ncr did you ever release the new gem version? I'm not seeing it on rubygems.

ncr commented 6 years ago

Just released. Sorry for the delay :)

pt., 14 wrz 2018 o 16:10 użytkownik Martin Posthumus < notifications@github.com> napisał:

@ncr https://github.com/ncr did you ever release the new gem version? I'm not seeing it on rubygems.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ncr/rack-proxy/pull/73#issuecomment-421370619, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAWpPJAemKEye88OByiNTb0o066uS4Mks5ua7jOgaJpZM4SnGDa .