Skip to content

http2: expand list of known headers

This PR adds access-control-*, dnt, forwarded, tk, upgrade-insecure-requests, warning, x-content-type-options and x-frame-options to known list of headers for HTTP2. Also expands tests to account for these headers. Should address https://github.com/nodejs/node/issues/15337

All of the headers added have an official proposal/standard and are in active use. There might be more that I missed since they're kind of scattered all over and there's no one perfect list.

The most impactful thing here is the validation for new single value headers (since adding things that aren't single value headers to that list would break users' code):

Let me know if any changes are needed. Thanks!

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

http2, test

Merge request reports

Loading