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

host header not suppressed for proxy connections #2258

Closed
gopherbot opened this issue Sep 14, 2011 · 4 comments
Closed

host header not suppressed for proxy connections #2258

gopherbot opened this issue Sep 14, 2011 · 4 comments

Comments

@gopherbot
Copy link

by jason@eggnet.com:

the (*Request).write() function does not conform to the documentation:

// If req.RawURL is non-empty, WriteProxy uses it unchanged
// instead of URL but still omits the Host: header.

The Host header should be suppressed if usingProxy is true.

Currently the Host header is unconditionally written to the request, which is easy to
see by inspection.  There is no if wrapped around fmt.Fprintf(bw, "Host:
%s\r\n", host)

Which revision are you using?  (hg identify)

b0819469a6df (release-branch.r60) release/release.r60
@bradfitz
Copy link
Contributor

Comment 1:

This is just a documentation problem.  I'll fix the glitch.
Host headers are still required, even with proxies.  (that was a previous fix, but docs
weren't updated to match)

Owner changed to @bradfitz.

@rsc
Copy link
Contributor

rsc commented Sep 15, 2011

Comment 2:

Status changed to Accepted.

@gopherbot
Copy link
Author

Comment 3 by jason@eggnet.com:

Interesting, thank you.

@bradfitz
Copy link
Contributor

Comment 4:

This issue was closed by revision 7233dcd.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants