Add HttpSys wrapper interface for HttpQueryRequestProperty Windows API#66700
Merged
DeagleGross merged 6 commits intoMay 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new generic wrapper around the Windows HttpQueryRequestProperty API to IHttpSysRequestPropertyFeature, exposing both synchronous and asynchronous methods so callers can query any HTTP_REQUEST_PROPERTY value (TLS cipher info, stream errors, TCP stats, etc.) without per-property feature work. Implements the API closing issue #63181 (note that the async overload is experimental per the PR description).
Changes:
- New
TryGetRequestProperty/TryGetRequestPropertyAsyncinterface members plus aHttpSysRequestPropertyResultresult struct (public API). RequestContextcore implementations and a newRequestPropertyQueryAsyncContextIOCP-drivenIValueTaskSource<T>for async completion.- Tests, sample middleware, new logger event id, and a fix for the duplicate
TlsClientHelloRetrieveErrorlogger event id.
Show a summary per file
| File | Description |
|---|---|
| src/Servers/HttpSys/src/IHttpSysRequestPropertyFeature.cs | Adds public sync/async query methods to the feature interface with XML docs. |
| src/Servers/HttpSys/src/HttpSysRequestPropertyResult.cs | New public result struct for the async overload. |
| src/Servers/HttpSys/src/SourceBuildStubs.cs | Mirrors the new interface members + result struct for source-build. |
| src/Servers/HttpSys/src/PublicAPI.Unshipped.txt | Tracks the new public API surface. |
| src/Servers/HttpSys/src/RequestProcessing/RequestContext.cs | Sync core wrapper + async dispatch into the new context. |
| src/Servers/HttpSys/src/RequestProcessing/RequestContext.FeatureCollection.cs | Wires the interface implementations into the feature collection. |
| src/Servers/HttpSys/src/RequestProcessing/RequestPropertyQueryAsyncContext.cs | New IValueTaskSource<HttpSysRequestPropertyResult> driving the async path with IOCP. |
| src/Servers/HttpSys/src/RequestProcessing/RequestContext.Log.cs | Fixes mis-used event id and adds QueryRequestPropertyError. |
| src/Servers/HttpSys/src/LoggerEventIds.cs | Adds QueryRequestPropertyError event id. |
| src/Servers/HttpSys/test/FunctionalTests/HttpsTests.cs | E2E tests covering sync/async success, buffer-too-small, and pre-cancellation. |
| src/Servers/HttpSys/samples/TlsFeaturesObserve/Program.cs | Sample middleware exercising the new sync/async query methods. |
Copilot's findings
- Files reviewed: 11/11 changed files
- Comments generated: 2
Comment on lines
+24
to
25
| [LoggerMessage(LoggerEventIds.TlsListenerError, LogLevel.Debug, "Failed to invoke QueryTlsClientHello; RequestId: {RequestId}; Win32 Error code: {Win32Error}", EventName = "TlsClientHelloRetrieveError")] | ||
| public static partial void TlsClientHelloRetrieveError(ILogger logger, ulong requestId, uint win32Error); |
Open
3 tasks
3 tasks
halter73
approved these changes
May 22, 2026
DeagleGross
added a commit
to DeagleGross/aspnetcore
that referenced
this pull request
May 27, 2026
…ate) Merges upstream commits: * d17cc21 — Add HttpSys wrapper for HttpQueryRequestProperty (dotnet#66700) * 0fcd398 — Recompile workflows with gh aw v0.76.1 (dotnet#66864) * e4591cc — dotnet/optimization dependency update * c3a3603 — Update issue-triage-agent.md (dotnet#66852) (already merged previously) Conflict resolution: * All 5 .lock.yml files conflicted because both branches recompiled them. Took upstream's lock files (their v0.76.1 recompile is the canonical baseline), then re-ran `gh aw compile` on our two source files (issue-triage-agent.md and triage-comment-reviewer.md) so our .md changes (orchestrator/worker split, reviewer policy, OpenAPI disambiguation tip, etc.) are re-layered on top of v0.76.1. * .github/agents/agentic-workflows.agent.md was auto-updated by `gh aw compile` to point at v0.76.1 documentation URLs and to pick up the new dispatcher routing entries (asciicharts, cli-commands, token-optimization, patterns) that gh-aw upstream added between v0.71.1 and v0.76.1. Upstream hadn't bumped this file yet in their recompile commit, so the diff is legitimate and forward-looking. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
javiercn
pushed a commit
that referenced
this pull request
May 28, 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.
Added support for reading an arbitrary HTTP_REQUEST_PROPERTY value from HTTP.SYS using the HttpQueryRequestProperty.
Closes #63181