Skip to content

docs: modernize HTTP/2 ALPN and h2c guidance - #1253

Open
samueleresca wants to merge 1 commit into
apache:mainfrom
samueleresca:docs/http2-modernize-alpn-h2c-guidance
Open

docs: modernize HTTP/2 ALPN and h2c guidance#1253
samueleresca wants to merge 1 commit into
apache:mainfrom
samueleresca:docs/http2-modernize-alpn-h2c-guidance

Conversation

@samueleresca

Copy link
Copy Markdown
Member

Motivation:
The HTTP/2 server-side doc still described ALPN as requiring separate negotiation setup and documented a JDK <= 9 fallback where curl could not determine h2 support, plus it presented the HTTP/1.1 h2c Upgrade mechanism without noting it is now obsolete per RFC 9113. Apache Pekko HTTP's minimum supported JDK has since moved to 17, where ALPN is natively part of JSSE and the RFC 7540 Upgrade path has been superseded.

Modification:
Reword the ALPN section to state it needs no extra provider or boot classpath configuration on supported JDKs, and link to RFC 7301/RFC 9113 instead of RFC 7540. Add a warning that h2c Upgrade is obsolete in RFC 9113 and should only be used for older-client compatibility, rename the "h2c with prior knowledge" section to "Cleartext HTTP/2 with prior knowledge", and drop the outdated JDK <= 9 curl fallback example that no longer applies on the project's supported JDKs.

Result:
The doc reflects the project's current JDK baseline and RFC 9113 guidance without the stale JDK <= 9 ALPN caveat or unlabeled deprecated h2c Upgrade mechanism.

Tests:
Not run - docs only

References:
None - documentation accuracy update

Motivation:
The HTTP/2 server-side doc still described ALPN as requiring separate
negotiation setup and documented a JDK <= 9 fallback where curl could not
determine h2 support, plus it presented the HTTP/1.1 h2c Upgrade mechanism
without noting it is now obsolete per RFC 9113. Apache Pekko HTTP's minimum
supported JDK has since moved to 17, where ALPN is natively part of JSSE
and the RFC 7540 Upgrade path has been superseded.

Modification:
Reword the ALPN section to state it needs no extra provider or boot
classpath configuration on supported JDKs, and link to RFC 7301/RFC 9113
instead of RFC 7540. Add a warning that h2c Upgrade is obsolete in RFC 9113
and should only be used for older-client compatibility, rename the "h2c
with prior knowledge" section to "Cleartext HTTP/2 with prior knowledge",
and drop the outdated JDK <= 9 curl fallback example that no longer applies
on the project's supported JDKs.

Result:
The doc reflects the project's current JDK baseline and RFC 9113 guidance
without the stale JDK <= 9 ALPN caveat or unlabeled deprecated h2c Upgrade
mechanism.

Tests:
Not run - docs only

References:
None - documentation accuracy update
have [Prior Knowledge](https://httpwg.org/specs/rfc7540.html#known-http) of
HTTP/2 support.
Apache Pekko HTTP supports starting a cleartext HTTP/2 connection with
[prior knowledge](https://www.rfc-editor.org/rfc/rfc9113.html#section-3.3). For compatibility with older clients, it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you keep this as Prior Knowledge - commonly referred to in this form - https://www.google.com/search?q=prior+knowledge+http


The HTTP/1.1 Upgrade mechanism and the `h2c` upgrade token are obsolete in
[RFC 9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-11.2). Use this mode only when compatibility with an
older client requires it. New cleartext HTTP/2 clients should use prior knowledge.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same point about Prior Knowledge

to HTTP/2 before sending your first 'real' request, at the cost of a roundtrip.

#### h2c with prior knowledge
#### Cleartext HTTP/2 with prior knowledge

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Again, I'd prefer Prior Knowledge especially as this is a header and most words in a header are typically started with Caps - 'with' would usually be left as lowercase

[Prior Knowledge](https://httpwg.org/specs/rfc7540.html#known-http) of HTTP/2
support.
For this reason the approach is known as HTTP/2 with
[prior knowledge](https://www.rfc-editor.org/rfc/rfc9113.html#section-3.3).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same issue with Prior Knowledge

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.

2 participants