[build-ops] Remove CsWin32 enum workarounds for HTTP API types#37
Open
github-actions[bot] wants to merge 11 commits intomainfrom
Open
[build-ops] Remove CsWin32 enum workarounds for HTTP API types#37github-actions[bot] wants to merge 11 commits intomainfrom
github-actions[bot] wants to merge 11 commits intomainfrom
Conversation
…tworkflow agentic-worklow on updating cswin32
…tworkflow Add dotnet build capability to cswin32 agentic workflow
…tworkflow Dmkorolev/cswin32 update agentworkflow
Replace hardcoded integer casts with proper enum members for: - HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfo - HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsClientHello - HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHello - HTTP_FEATURE_ID.HttpFeatureQueryCipherInfo These enum values are now available in CsWin32 0.3.269 and generated from the Windows metadata, eliminating the need for workaround casts. Affected files: - src/Servers/HttpSys/src/NativeInterop/HttpApi.cs - src/Servers/HttpSys/src/RequestProcessing/RequestContext.cs - src/Servers/IIS/IIS/src/Core/IISHttpContext.cs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 24, 2026
This was referenced Apr 8, 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
This PR removes hardcoded integer cast workarounds for HTTP API enum types that are now properly generated by CsWin32 0.3.269.
Changes
Replaced hardcoded integer casts with proper enum members in:
HttpSys Server
src/Servers/HttpSys/src/NativeInterop/HttpApi.cs
(HTTP_FEATURE_ID)11→HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHello(HTTP_FEATURE_ID)15→HTTP_FEATURE_ID.HttpFeatureQueryCipherInfosrc/Servers/HttpSys/src/RequestProcessing/RequestContext.cs
(HTTP_REQUEST_PROPERTY)14→HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfo(HTTP_REQUEST_PROPERTY)11→HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsClientHelloIIS Server
(HTTP_REQUEST_PROPERTY)14→HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfoVerification
These enum values exist in the Windows metadata (microsoft/win32metadata) and are included in CsWin32's code generation:
HTTP_FEATURE_IDis already listed insrc/Servers/HttpSys/src/NativeMethods.txt(line 17)HTTP_REQUEST_PROPERTYis already listed in both HttpSys and IIS NativeMethods.txt filesThe CsWin32 source generator produces these enum members from the Windows SDK metadata, making the workaround casts unnecessary.
Notes