Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy: force HttpRequest.Close to false when dropping hop-by-hop headers #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pmezard
Copy link
Contributor

@pmezard pmezard commented Apr 18, 2015

I suppose there is logic in HttpRequest to set the field when receiving
the header, but apparently it does not keep both in sync (or favor the
field). The tests were failing for me on OSX10 / Go 1.4.2 with:

--- FAIL: TestNoProxyHeaders (0.00s)
proxy_test.go:535: Got Connection header from goproxy map[Connection:[close] Accept-Encoding:[gzip] User-Agent:[Go 1.1 package http]]
--- FAIL: TestNoProxyHeadersHttps (0.27s)
proxy_test.go:535: Got Connection header from goproxy map[User-Agent:[Go 1.1 package http] Connection:[close] Accept-Encoding:[gzip]]
FAIL
FAIL github.com/elazarl/goproxy 2.428s

Probably fixed #92, which I noticed while submitting the PR.

I suppose there is logic in HttpRequest to set the field when receiving
the header, but apparently it does not keep both in sync (or favor the
field). The tests were failing for me on OSX10 / Go 1.4.2 with:

--- FAIL: TestNoProxyHeaders (0.00s)
        proxy_test.go:535: Got Connection header from goproxy map[Connection:[close] Accept-Encoding:[gzip] User-Agent:[Go 1.1 package http]]
--- FAIL: TestNoProxyHeadersHttps (0.27s)
        proxy_test.go:535: Got Connection header from goproxy map[User-Agent:[Go 1.1 package http] Connection:[close] Accept-Encoding:[gzip]]
FAIL
FAIL    github.com/elazarl/goproxy      2.428s
@pmezard
Copy link
Contributor Author

pmezard commented Oct 3, 2015

@elazarl ping

The issue still exists with Go 1.5+ and recent goproxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestNoProxyHeaders and TestNoProxyHeadersHttps tests failing
1 participant