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

doc: improve http.request and https.request options #1551

Closed
wants to merge 3 commits into from

Conversation

silverwind
Copy link
Contributor

Fixes #1082. Also made the hostname option more clear.

R=@cjihrig

@silverwind silverwind added the doc Issues and PRs related to the documentations. label Apr 28, 2015
@cjihrig
Copy link
Contributor

cjihrig commented Apr 28, 2015

If we want to explicitly support the family option here, this LGTM.

@silverwind
Copy link
Contributor Author

Also copied all options from http.request to https.request, it was lagging behind on docs.

@silverwind silverwind changed the title doc: improve http.connect option descriptions doc: improve http.connect options Apr 28, 2015
preferred over `host`.
- `family`: IP address family to use when resolving `host` and `hostname`.
Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be
used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjihrig didn't your example in the original issue state that this was required for ipv6?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fishrock123 TL;DR, I believe @silverwind statement to be correct here.

In that particular example, IPv6 was required, as the server was only listening on '::1'. When dns.lookup() executes, it looks up localhost and returns the results [ '127.0.0.1', '::1', 'fe80::1' ] (on my local machine). The first result is used, and the family is inferred as 4.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So basically #708..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understood #708 as a request to attempt multiple IPs from the same family.

What exactly does a browser on dual stack do if it encounters both v4 and v6? Attempt both in succession? In parallel? Whatever it does, I think that's what we should do if no family is given.

@silverwind silverwind changed the title doc: improve http.connect options doc: improve http.request and https.request options Apr 30, 2015
@silverwind
Copy link
Contributor Author

@Fishrock123 Any objections to me merging this right now? I think it's a clear improvement.

@Fishrock123
Copy link
Contributor

LGTM

silverwind added a commit that referenced this pull request May 1, 2015
This adds a few previously undocumented option to both functions.

PR-URL: #1551
Fixes: #1082
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@silverwind
Copy link
Contributor Author

Landed in b4ad5d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dns resolver ipv6
3 participants