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

url.resolveObject: conflicting values of host and port #8213

Closed
imyller opened this issue Aug 21, 2016 · 1 comment
Closed

url.resolveObject: conflicting values of host and port #8213

imyller opened this issue Aug 21, 2016 · 1 comment
Labels
url Issues and PRs related to the legacy built-in url module.

Comments

@imyller
Copy link
Member

imyller commented Aug 21, 2016

  • Version: v6.4.0
  • Platform: Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
  • Subsystem: url

url.resolveObject generates inconsistent port and host value when modifying port:

$ node
> url.resolveObject('http://example.com:81', 'http://example.com:82');
Url {
  protocol: 'http:',
  slashes: true,
  auth: null,
  host: 'example.com:82',
  port: '81',
  hostname: 'example.com',
  hash: null,
  search: null,
  query: null,
  pathname: '/',
  path: '/',
  href: 'http://example.com:82/' }
> 

Where port and host unexpectedly contain conflicting information:

  host: 'example.com:82',
  port: '81',
imyller added a commit to imyller/node that referenced this issue Aug 21, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: nodejs#8213

Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
@mscdex mscdex added the url Issues and PRs related to the legacy built-in url module. label Aug 21, 2016
@imyller
Copy link
Member Author

imyller commented Aug 21, 2016

I've opened PR with a fix and test case.

evanlucas pushed a commit that referenced this issue Aug 24, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: #8213
PR-URL: #8214
Reviewed-By: James M Snell <jasnell@gmail.com>
imyller added a commit to imyller/node that referenced this issue Sep 30, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: nodejs#8213
PR-URL: nodejs#8214
Reviewed-By: James M Snell <jasnell@gmail.com>
imyller added a commit to imyller/node that referenced this issue Sep 30, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: nodejs#8213
PR-URL: nodejs#8214
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 30, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: #8213
Ref: #8872
PR-URL: #8214
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 10, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: #8213
Ref: #8872
PR-URL: #8214
Reviewed-By: James M Snell <jasnell@gmail.com>
rvagg pushed a commit that referenced this issue Oct 18, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: #8213
Ref: #8872
PR-URL: #8214
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 26, 2016
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: #8213
Ref: #8872
PR-URL: #8214
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants