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

Add default port to host header when no port specified. Fixes #62 #63

Merged
merged 1 commit into from Feb 9, 2016

Conversation

@mtharrison
Copy link
Member

mtharrison commented Jan 11, 2016

No description provided.

@mtharrison mtharrison added the bug label Jan 11, 2016
@@ -41,7 +41,10 @@ exports = module.exports = internals.Request = function (options) {
});

this.headers['user-agent'] = this.headers['user-agent'] || 'shot';
this.headers.host = this.headers.host || uri.host || options.authority || 'localhost';
this.headers.host = this.headers.host ||
(uri.protocol === 'https:' && !uri.port ? uri.host + ':443' : uri.host) ||

This comment has been minimized.

Copy link
@hueniverse

hueniverse Jan 11, 2016

Member

I would set the port on every host header, not just https.

This comment has been minimized.

Copy link
@mtharrison

mtharrison Feb 8, 2016

Author Member

@hueniverse how does this look now?

@mtharrison mtharrison force-pushed the https-port branch from 93d309c to 2a8fd37 Jan 12, 2016
@mtharrison mtharrison force-pushed the https-port branch from 2a8fd37 to dd98202 Jan 12, 2016
@mtharrison mtharrison changed the title Explicitly add default https port to host header when no port specified. Fixes #62 Add default port to host header when no port specified. Fixes #62 Jan 13, 2016
@hueniverse hueniverse self-assigned this Feb 9, 2016
hueniverse added a commit that referenced this pull request Feb 9, 2016
Add default port to host header when no port specified. Fixes #62
@hueniverse hueniverse merged commit 95962b5 into master Feb 9, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@hueniverse hueniverse added this to the 3.0.1 milestone Feb 9, 2016
@hueniverse hueniverse deleted the https-port branch Feb 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.