Skip to content

fix: render HTTP/2 request authority from host and port - #1680

Open
He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:fix/http2-outbound-authority
Open

He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:fix/http2-outbound-authority

Conversation

@He-Pin

@He-Pin He-Pin commented Nov 26, 2026

Copy link
Copy Markdown
Member

Motivation

HTTP/2 requests for HTTP or HTTPS resources must not include URI userinfo in the :authority pseudo-header.

Modification

Apply host-and-port projection after the existing authority selection. Cover the projection with a local typed-model regression and document the outgoing field.

Result

Absolute URI, Host header, and connection fallback precedence are unchanged. Explicit ports and IPv6 formatting are preserved. HTTP/1 and the public URI model are unchanged.

Tests

The new projection test failed against the previous behavior. All five focused cases passed on Scala 2.13.18 and 3.3.9 with JDK 17, including an independent run against the committed tree. Scoped Scalafmt and git diff --check passed.

References

RFC 9113, Section 8.3.1 and RFC 9110, Section 4.2.4.

Motivation:
HTTP/2 authority rendering must not include the optional userinfo of
a modeled HTTP or HTTPS URI.

Modification:
Select the authority from the existing sources, then render its host
and port without userinfo. Add a pure model projection test and
document the outgoing field.

Result:
Absolute URI, Host header and connection fallback precedence are
unchanged. Explicit ports, IPv6 formatting and the generic URI model
remain unchanged.

Tests:
- New pure projection test failed before normalization; its four
  existing ordinary renderer controls passed.
- All five cases passed on Scala 2.13.18 and 3.3.9 using JDK 17.
- Scoped Scalafmt 3.11.5 and git diff --check passed.

References:
None - RFC 9113 Section 8.3.1 and RFC 9110 Section 4.2.4.
@He-Pin
He-Pin requested a review from pjfanning November 26, 2026 23:32
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