Skip to content

Allow bracketed IPv6 authorities without ports in wasi-http p3#13697

Open
modernzju wants to merge 1 commit into
bytecodealliance:mainfrom
modernzju:main
Open

Allow bracketed IPv6 authorities without ports in wasi-http p3#13697
modernzju wants to merge 1 commit into
bytecodealliance:mainfrom
modernzju:main

Conversation

@modernzju

Copy link
Copy Markdown

This updates the wasi-http p3 set_authority validation to allow bracketed IPv6 authorities without an explicit port, such as [::].

Previously p3 treated any : in the authority string as indicating a port. That incorrectly rejected bracketed IPv6 literals without ports because their colons are part of the host. This keeps the existing validation for invalid ports, such as bad-port:99999, while only treating a bracketed IPv6 authority as having a port when the suffix after ] starts with :.

A test case was added to align p3 behavior with the existing p2 coverage for [::]:443 and [::].

Testing:

  • cargo fmt --check
  • cargo test -p wasmtime-wasi-http --features p3,default-send-request p3_http_outbound_request_response_build

Signed-off-by: modernzju <modernzju@outlook.com>
@modernzju modernzju requested review from a team as code owners June 20, 2026 16:54
@modernzju modernzju requested review from dicej and removed request for a team June 20, 2026 16:54
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.

1 participant