-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21531ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@buger it looks like
-output-http
blows away-http-rewrite-header
There's special logic to protect
-http-set-header 'host: foo'
from being disrupted by-output-http
:a79e54c#diff-2663f1d9618ebe24ecdbe9e29bc5af4fR101
I suspect this should be replicated for
-http-rewrite-header
as well21531ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @buger for building this! A workaround for @frankfarmer's issue above would be to also use
-http-original-host
to keep the header from being disrupted by-output-http
.One other issue is that the Host header gets special treatment in proto.go's SetHost function in order to be compatible with HTTP 1.0 where host names are specified as part of the path after the method instead of in a Host: header. (e.g. GET http://www.foo.com/path HTTP/1.0) The newly-added header rewriting logic does not handle this special case for the Host header.