Uh oh!
There was an error while loading. Please reload this page.
Ignore unknown address types when looking up hosts - #34067
Conversation
rust-highfive
commented
Jun 3, 2016
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Change the implementation to an iterative one, please. Its a trivially optimisable tail-call which will not get optimised out in debug builds.
nagisa
commented
Jun 4, 2016
Seems to me like we’re losing on the errors reported by |
tbu-
commented
Jun 4, 2016
@nagisa No, this is only removing the error type when iterating over the |
alexcrichton
commented
Jun 5, 2016
Why change the iterator? If the real bug here is that unknown addresses cause too many errors then it sounds like we need to explicitly ignore those real addresses. Hiding errors seems... bad? |
tbu-
commented
Jun 5, 2016
We're not hiding an error any function is returning. |
alexcrichton
commented
Jun 7, 2016
Is... there motivation for this PR? Presumably you ran across this somehow? |
tbu-
commented
Jun 7, 2016
The motivation of this is that I don't know what to do with the The standard library's way to deal with them seems like a bad idea, the |
alexcrichton
commented
Jun 28, 2016
The libs team discussed this during triage yesterday and the conclusion was that this implementation seems fine for now, but the docs need to be bolstered with respect to the behavior here. Can you be sure to update relevant documentation to indicate that unknown address types are ignored? |
Previously, any function using a `ToSocketAddrs` input would fail if passed a hostname that resolves to an address type different from the ones recognized by Rust. This also changes the `LookupHost` iterator to only include the known address types, as a result, it doesn't have to return `Result`s any more, which are likely misinterpreted as failed name lookups.
e4fc282 to
6aa0182Comparetbu-
commented
Jun 29, 2016
@alexcrichton Updated the documentation. |
alexcrichton
commented
Jun 29, 2016
bors
commented
Jun 30, 2016
⌛ Testing commit 6aa0182 with merge fbafb96... |
bors
commented
Jun 30, 2016
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
tbu-
commented
Jun 30, 2016
That doesn't look like this PR's fault. |
alexcrichton
commented
Jun 30, 2016
@bors: retry On Thu, Jun 30, 2016 at 6:30 AM, tbu- notifications@github.com wrote:
|
bors
commented
Jul 1, 2016
⌛ Testing commit 6aa0182 with merge bb88a57... |
bors
commented
Jul 1, 2016
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
tbu-
commented
Jul 1, 2016
Something is seriously wrong with the bots, but it's not me: |
bors
commented
Jul 1, 2016
⌛ Testing commit 6aa0182 with merge 1b514ac... |
bors
commented
Jul 1, 2016
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
alexcrichton
commented
Jul 1, 2016
@bors: retry On Fri, Jul 1, 2016 at 12:27 PM, bors notifications@github.com wrote:
|
bors
commented
Jul 2, 2016
…alexcrichton Ignore unknown address types when looking up hosts Previously, any function using a `ToSocketAddrs` input would fail if passed a hostname that resolves to an address type different from the ones recognized by Rust. This also changes the `LookupHost` iterator to only include the known address types, as a result, it doesn't have to return `Result`s any more, which are likely misinterpreted as failed name lookups.
Previously, any function using a
ToSocketAddrsinput would fail ifpassed a hostname that resolves to an address type different from the
ones recognized by Rust.
This also changes the
LookupHostiterator to only include the knownaddress types, as a result, it doesn't have to return
Results anymore, which are likely misinterpreted as failed name lookups.