[whatwg/fetch] Define behavior for `Priority` request header (Issue #1718)

### What is the issue with the Fetch Standard?

The `Priority` request header is part of [RFC 9218](https://datatracker.ietf.org/doc/html/rfc9218#name-the-priority-http-header-fi) (Extensible HTTP Priorities) and sent by the networking layer when appropriate (for most browsers this is when using HTTP/3, Chrome may start sending it for HTTP/2 as well).

The header is not currently on the list of [forbidden request headers](https://fetch.spec.whatwg.org/#forbidden-request-header) and the behavior is undefined for how it interacts with a user-provided `Priority` header in fetch.

For actual prioritization, fetch provides [RequestPriority](https://fetch.spec.whatwg.org/#enumdef-requestpriority) (though it is not as granular) but applications may have their own use for the header name if they are already sending it.

It would be helpful to specify the behavior either by adding it to the forbidden header list or defining how the extensible priorities header should be treated if an application provides an explicit `Priority` header.

The current behavior in Firefox is to send both headers. In Chrome (behind a flag) the header will only be set by the networking stack if the application didn't include a `Priority` header as part of the request.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1718
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1718@github.com>

Received on Monday, 16 October 2023 13:37:42 UTC