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

Force port only if not using scheme default #58

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

Conversation

mildis
Copy link
Contributor

@mildis mildis commented Oct 13, 2018

HttpClient issue the Host header with the port whenever the port is defined.
This patch only set the port when not using the default scheme port
(80 for http and 443 for https)

scheme=http, host=example.com, port=80 => Host: example.com
scheme=https, host=example.com, port=443 => Host: example.com
scheme=http, host=example.com, port=8080 => Host: example.com:8080
scheme=https, host=example.com, port=8443 => Host: example.com:8443

Change-Id: I19d238c1abd871d2f641a2643770ab8c78594d6f

HttpClient issue the Host header with the port whenever the port is defined.
This patch only set the port when not using the default scheme port
(80 for http and 443 for https)

scheme=http, host=example.com, port=80 => Host: example.com
scheme=https, host=example.com, port=443 => Host: example.com
scheme=http, host=example.com, port=8080 => Host: example.com:8080
scheme=https, host=example.com, port=8443 => Host: example.com:8443

Change-Id: I19d238c1abd871d2f641a2643770ab8c78594d6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant