netliomax25-code opened PR #13739 from netliomax25-code:wasi-http-p3-authority-ipv6 to bytecodealliance:main:
Repro: in WASIp3, call
request.set-authoritywith a bracketed IPv6 literal that has no explicit port, for example[::1]or[2001:db8::1]. The call returns an error and the authority is never set.Cause: the validation detects whether a port was supplied with
authority.contains(':')before checking that the port parses. That is also true for the colons inside an IPv6 literal host, so the later "port present but not a valid number" guard fires and a perfectly valid IPv6 authority is rejected unless a port is also appended.Fix: look for the port only after any closing
], so colons inside the IPv6 host are not mistaken for a port. A genuinely malformed port such asexample.com:orexample.com:abcis still rejected. The check moved into a smallparse_authorityhelper with unit tests for the host-name, IPv4, and bracketed IPv6 forms.
netliomax25-code requested pchickey for a review on PR #13739.
netliomax25-code requested wasmtime-wasi-reviewers for a review on PR #13739.
:thumbs_up: pchickey submitted PR review:
Thanks, I have now learned something disappointing about the http::Authority parser that I had higher expectations of. Fix much appreciated.
pchickey added PR #13739 fix p3 request.set-authority rejecting ipv6 literal authorities to the merge queue.
:check: pchickey merged PR #13739.
pchickey removed PR #13739 fix p3 request.set-authority rejecting ipv6 literal authorities from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC