- Notifications
You must be signed in to change notification settings - Fork5.1k
Reduce the size of HeaderDescriptor#64105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedJan 21, 2022
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFixes#62847 NonValidatedAdd_NonValidatedEnumerate:
SendAsync (Create and serialize the request, parse the response and enumerate 4 response headers)
|
@@ -96,7 +96,7 @@ internal static class QPackStaticTable | |||
(new HeaderDescriptor(KnownHeaders.Authorization), ""), // 84 | |||
(new HeaderDescriptor(KnownHeaders.ContentSecurityPolicy), "script-src 'none'; object-src 'none'; base-uri 'none'"), // 85 | |||
(new HeaderDescriptor("early-data"), "1"), // 86 | |||
(new HeaderDescriptor("expect-ct"), ""), // 87 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is an existing bug in HTTP/3 wherex-xss-protection
andexpect-ct
lookups/removes would silently fail if added viaOnStaticIndexedHeader
.
src/libraries/System.Net.Http/src/System/Net/Http/Headers/HeaderDescriptor.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/libraries/System.Net.Http/src/System/Net/Http/Headers/HeaderDescriptor.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
public HttpHeaderParser? Parser => (_descriptor as KnownHeader)?.Parser; | ||
public HttpHeaderType HeaderType => _descriptor is KnownHeader knownHeader ? knownHeader.HeaderType : HttpHeaderType.Custom; | ||
public bool Equals(KnownHeader other) => ReferenceEquals(_descriptor, other); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It's a little weird to call this method "Equals".
I'd suggest calling it "IsKnownHeader(KnownHeader header)" but we already have a method called that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Would you find the==
operator more fitting here?
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@dotnet/ncl Please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM thanks
@@ -96,7 +96,7 @@ internal static class QPackStaticTable | |||
(new HeaderDescriptor(KnownHeaders.Authorization), ""), // 84 | |||
(new HeaderDescriptor(KnownHeaders.ContentSecurityPolicy), "script-src 'none'; object-src 'none'; base-uri 'none'"), // 85 | |||
(new HeaderDescriptor("early-data"), "1"), // 86 | |||
(new HeaderDescriptor("expect-ct"), ""), // 87 | |||
(new HeaderDescriptor(KnownHeaders.ExpectCT), ""), // 87 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should we be adding KnownHeaders entries for the othernew HeaderDescriptor(string)
entries in this table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That would be my hope as part of#63750, I updated the post to includeQPackStaticTable
Uh oh!
There was an error while loading.Please reload this page.
Fixes#62847
NonValidatedAdd_NonValidatedEnumerate:
SendAsync (Create and serialize the request, parse the response and enumerate 4 response headers):