ncr / rack-proxy

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

remove Hop-by-hop Header Fields #59

Closed alChaCC closed 7 years ago

alChaCC commented 7 years ago

The problem I met just like this: https://github.com/ncr/rack-proxy/issues/50

I use curl to get data from website which will return transfer-encoding.
I will see curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding

According to HTTP doc, we should remove Hop-by-hop header due to we are proxy. Right?

malclocke commented 7 years ago

I can confirm this is an issue for us with a different hop-by-hop header.

If I set curl -H 'Connection: keep-alive' ... on one of our proxied endpoints the response takes an additional ~20 seconds. The issue is fixed for us by:

def rewrite_env
   ...
   env.delete("HTTP_CONNECTION")
   ...
end
Zhyhun commented 7 years ago

I've found this PR useful due to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#hbh Will it be merged?

younker commented 7 years ago

@ncr Do you still maintain this? If not, who does? I ask because this PR is a valuable addition in my opinion and would have saved me a couple hours had it ben merged. I am happy to help with this repo should you be looking for maintenance help.

ncr commented 7 years ago

Hi there, I missed the notification for this PR. I don't actively develop this project anymore, but I merge PRs and release new gems.

ncr commented 7 years ago

Thanks for the PR @alChaCC! Sorry for merging so late.