]> git.kaiwu.me - nginx.git/commit
HTTP/2: handle PRIORITY_UPDATE frames
authorAndrew Clayton <a.clayton@nginx.com>
Wed, 23 Sep 2026 20:17:33 +0000 (21:17 +0100)
committerAndrew Clayton <a.clayton@nginx.com>
Mon, 28 Sep 2026 21:01:20 +0000 (22:01 +0100)
commit2b6c2de41d9dd6b7ffa72c78a698db87eb3be683
treed50b10e44b1742a18bbea97791220c43b39112c2
parentb5bd4b34871ecaed15a64cb446172f280e56d4d7
HTTP/2: handle PRIORITY_UPDATE frames

Implement the RFC 9218 PRIORITY_UPDATE frame (type 0x10).  The frame is
sent on stream 0 and carries a prioritized stream id and a Priority
Field Value; it is validated for framing errors and dispatched from
ngx_http_v2_state_head().

A PRIORITY_UPDATE conveys a complete set of parameters (RFC 9218,
Section 7): omitted parameters reset to their defaults, so the value
replaces any earlier signal.  A frame for a stream that already exists
is applied at once.  A frame for a not-yet-created stream is buffered on
its node until the HEADERS frame arrives; the node is parked in
h2c->closed and, while the RFC 7540 tree is still present, attached to
the root as is done for a PRIORITY frame with a zero dependency.  The
number of buffered signals is bounded by the node reuse budget.

A malformed value is logged and ignored, leaving the current priority
untouched.  A value that does not fit the state buffer while the frame
is fragmented is skipped.

The signals are only collected here; the scheduler still uses the
RFC 7540 dependency tree until the switch to RFC 9218.

Assisted-by: opencode:claude-opus-4.8
src/http/v2/ngx_http_v2.c
src/http/v2/ngx_http_v2.h