]> git.kaiwu.me - nginx.git/commit
HTTP/2: parse Priority request header
authorAndrew Clayton <a.clayton@nginx.com>
Tue, 22 Sep 2026 00:52:41 +0000 (01:52 +0100)
committerAndrew Clayton <a.clayton@nginx.com>
Mon, 28 Sep 2026 21:01:20 +0000 (22:01 +0100)
commit4d147459db07ff57888f8323b5addb0deafd234c
tree8bf1f4b87cb816199427d361c570850037d34ac0
parent2b6c2de41d9dd6b7ffa72c78a698db87eb3be683
HTTP/2: parse Priority request header

Parse the RFC 9218 Priority request header, an RFC 8941 Structured
Fields Dictionary such as "u=3, i".

The header lines are collected during header block processing and, once
the block is complete, combined into a single value and parsed once in
ngx_http_v2_run_request(), as RFC 8941, Section 4.2, requires all field
lines of the same field to be combined before parsing.  This mirrors how
cookies are handled.  The header is still passed through to the request
so it stays visible to variables and proxying.

A malformed field is ignored, leaving the defaults.  A PRIORITY_UPDATE
frame overrides the header (RFC 9218, Section 7): if a frame has already
been applied to the stream the header is not consulted.

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