romange / helio

A modern framework for backend development based on io_uring Linux interface
Apache License 2.0
435 stars 49 forks source link

chore: Use only IPV4 for localhost dns #250

Closed dranikpg closed 5 months ago

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.96%. Comparing base (d30de86) to head (40bec81). Report is 36 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #250 +/- ## ========================================== - Coverage 77.60% 76.96% -0.65% ========================================== Files 103 104 +1 Lines 7824 7853 +29 ========================================== - Hits 6072 6044 -28 - Misses 1752 1809 +57 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

romange commented 5 months ago

Please see https://github.com/c-ares/c-ares/issues/70 The original ares_gethostbyname did not support answering the same query with results containing multiple families.

Therefore, the right way to fix it is to switch to https://c-ares.org/ares_getaddrinfo.html and then duplicate the logic of https://github.com/romange/helio/blob/82b3c9d39d4b0ea99325363e22c052454ef9f104/util/fibers/accept_server.cc#L95-L145

where we iterate over multiple answers and "prefer" the one we want.

dranikpg commented 5 months ago

Really bad we don't have proper dns tests, I did testing with DF. However fixing the current http_test would take quite some time

dranikpg commented 5 months ago

Oh, sorry, wrong files

romange commented 5 months ago

why did you remove the test? also, you can test it with localhost

dranikpg commented 5 months ago

why did you remove the test?

The whole file is outdated, it's not even compiled. I tried to uncomment the cmake stuff and it throws too much errors to be easily fixable