[package] Remove CsWin32 hardcoded integer enum casts in HttpSys#66248
Merged
DeagleGross merged 1 commit intoApr 10, 2026
Conversation
HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHello, HTTP_FEATURE_ID.HttpFeatureQueryCipherInfo, HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfo, and HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsClientHello are now generated by CsWin32 0.3.269 (via win32metadata 69.0.7-preview). Replace the integer-cast workarounds with the proper enum member names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DeagleGross
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CsWin32
0.3.269(viawin32metadata 69.0.7-preview) now generates the following enum members that were previously missing, requiring hardcoded integer casts as workarounds:HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHelloHTTP_FEATURE_ID.HttpFeatureQueryCipherInfoHTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfoHTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsClientHelloChanges
Workarounds fixed
src/Servers/HttpSys/src/NativeInterop/HttpApi.cs(HTTP_FEATURE_ID)11 /* HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHello */HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHellosrc/Servers/HttpSys/src/NativeInterop/HttpApi.cs(HTTP_FEATURE_ID)15 /* HTTP_FEATURE_ID.HttpFeatureQueryCipherInfo */HTTP_FEATURE_ID.HttpFeatureQueryCipherInfosrc/Servers/HttpSys/src/RequestProcessing/RequestContext.cs(HTTP_REQUEST_PROPERTY)14 /* HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfo */HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfosrc/Servers/HttpSys/src/RequestProcessing/RequestContext.cs(HTTP_REQUEST_PROPERTY)11 /* HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsClientHello */HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsClientHelloWorkarounds that remain
src/Shared/HttpSys/NativeInterop/SocketAddress.cs—.AsReadOnlySpan()inline array workaround: The referenced issue microsoft/CsWin32#1086 ("Leverage .NET 8/C# 12 inline arrays") was closed as "not planned", so CsWin32 will not generate inline arrays. This workaround must remain.Version check
No version bump was needed —
0.3.269is already the latest stable CsWin32 release (confirmed via GitHub releases API).Build output
(
dotnet build src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj)