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

fix(net): drop special localhost handling #1138

Merged
merged 1 commit into from
Jun 27, 2023
Merged

Conversation

Tachi107
Copy link
Member

It is unnecessary to special-case the "localhost" domain name, as documents like RFC 6761 (section 6.3) already define its semantics. It should hence be simply passed to getaddrinfo(), so that the proper loopback address is returned.

On the other hand, using "*" as a shorthand for "0.0.0.0" is not universally accepted, so Pistache should continue handle it specifically for backwards compatibility.

This restores getaddrinfo() coverage regressed by commit 50e39e1.

It is unnecessary to special-case the "localhost" domain name, as
documents like RFC 6761 (section 6.3)[1] already define its semantics.
It should hence be simply passed to getaddrinfo(), so that the proper
loopback address is returned.

On the other hand, using "*" as a shorthand for "0.0.0.0" is not
universally accepted, so Pistache should continue handle it specifically
for backwards compatibility.

This restores getaddrinfo() coverage regressed by commit
50e39e1.

[1]: https://www.rfc-editor.org/rfc/rfc6761.html#section-6.3
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.13 ⚠️

Comparison is base (e884d6d) 78.60% compared to head (01003e7) 78.47%.

❗ Current head 01003e7 differs from pull request most recent head 363629b. Consider uploading reports for the commit 363629b to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1138      +/-   ##
==========================================
- Coverage   78.60%   78.47%   -0.13%     
==========================================
  Files          53       53              
  Lines        6884     6881       -3     
==========================================
- Hits         5411     5400      -11     
- Misses       1473     1481       +8     
Impacted Files Coverage Δ
src/common/net.cc 87.41% <ø> (-0.14%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dennisjenkins75
Copy link
Collaborator

LGTM

@kiplingw kiplingw merged commit 63d5138 into master Jun 27, 2023
40 checks passed
@Tachi107 Tachi107 deleted the no-special-localhost branch June 28, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants