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

@dicej dicej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Would you mind rebasing this and fixing the conflict?

@fitzgen fitzgen added enhancement wasi-http Issues and PRs related to the wasi-http proposal labels Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement wasi-http Issues and PRs related to the wasi-http proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants