HTTP/3: Write static header names#38565
Conversation
| return H3StaticTable.ContentLength0; | ||
| case KnownHeaderType.Date: | ||
| return H3StaticTable.Date; | ||
| case KnownHeaderType.Cookie: |
There was a problem hiding this comment.
We should consider adding the un-"known" response headers given the methodology described in the quickwg QPACK static table appendix.
I also think the following headers only make sense on the request: Cookie, Authorization, UserAgent, Referer, Origin, IfModifiedSince, IfNoneMatch, Method, Accept, AcceptEncoding, AcceptLanguage, Range, IfRange and UpgradeInsecureRequests
Do we think there would be much value in trying to use the static header values too?
There was a problem hiding this comment.
I didn't add more known headers because there is a limit to how many we can have. Eventually, the bit flags will be too large for 64bits.
I will look at using the static table for values in a future PR. It will require greater changes.
There was a problem hiding this comment.
I also think the following headers only make sense on the request: Cookie, Authorization, UserAgent, Referer, Origin, IfModifiedSince, IfNoneMatch, Method, Accept, AcceptEncoding, AcceptLanguage, Range, IfRange and UpgradeInsecureRequests
Yes, remove request headers from this list, if only to make it easier to reason about.
There was a problem hiding this comment.
For HPACK, we have the complete list:
Do you want to trim the HPACK list as well? Which items?
Or leave both HPACK and QPACK lists as is?
There was a problem hiding this comment.
It looks to me that Http2HeadersEnumerator.GetResponseHeaderStaticTableId() only handles response headers. I don't see request headers like Cookie, Authorization or any of the rest in there.
There was a problem hiding this comment.
You're right. I'll make the change to remove them in another PR.
|
I like the test reorganization under Http1/Http2/Http3 |
Map known headers to QPACK static table. Write name id instead of full value when header is in the static table.