Conversation
This was referenced Sep 25, 2026
david-yu
added this pull request to stack #12
September 25, 2026 16:16
request::make takes the Host header as a string, so a caller with a
socket_address formats it, and the obvious "{}:{}" of address and port
produces "fd00::5:8080" for IPv6 — a different address, not an authority.
Seastar had no formatter to reach for.
Add http::internal::format_authority(), which brackets an IPv6 address per
RFC 3986 §3.2.2 and drops a zone index (an authority cannot carry one),
and request::make overloads taking a socket_address.
david-yu
force-pushed
the
ipv6/10-http-host-authority
branch
from
September 25, 2026 18:11
353917f to
02c5867
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 10 of 10 of the IPv6 series, split out of #1 and rebased on current
scylladb/seastarmaster. Based on #10, so the diff here is only this PR's commit.Why
request::maketakes the Host header as a string, so a caller with asocket_addressformats it, and the obvious"{}:{}"givesfd00::5:8080for IPv6: a different address, not an authority (RFC 3986 §3.2.2 wants[fd00::5]:8080).What
02c5867b2) —http::internal::format_authority(), which brackets IPv6 and drops a zone index (an authority cannot carry one), andrequest::makeoverloads taking asocket_address. The string overloads are unchanged.Testing
test_format_authority:10.0.0.1:80unchanged,[2001:db8::1]:8080bracketed,fe80::1%2loses its zone, andrequest::makeputs exactly that inHostand the URL.On the core-aws VM (Ubuntu 24.04, GCC 14, C++23, RelWithDebInfo, GnuTLS and OpenSSL in one tree), this PR's head builds and passes
dns,ipv6,socket,rpc,httpd,httpd_openssl,tls,tls_openssl,network_interface,websocketandunix_domainwithSEASTAR_TEST_REQUIRE_IPV6=1, so none of their IPv6 cases skipped.Stack