-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Fix and test HttpSys delegation #36677
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d7b917f
to
c55fcb3
Compare
@@ -136,18 +137,17 @@ private static void InitHttpApi(ushort majorVersion, ushort minorVersion) | |||
version.HttpApiMajorVersion = majorVersion; | |||
version.HttpApiMinorVersion = minorVersion; | |||
|
|||
var statusCode = HttpInitialize(version, (uint)HTTP_FLAGS.HTTP_INITIALIZE_SERVER, null); | |||
var statusCode = HttpInitialize(version, (uint)(HTTP_FLAGS.HTTP_INITIALIZE_SERVER | HTTP_FLAGS.HTTP_INITIALIZE_CONFIG), null); |
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.
What happen on older OSes that don't have this API?
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.
HTTP_INITIALIZE_CONFIG isn't a new flag, I think it's been around forever. What changed is that HttpIsFeatureSupported now requires it.
Looks like this doc needs to be updated. The functions listed that require EDIT: Sent a PR- https://github.com/MicrosoftDocs/sdk-api/pull/906/files |
using Microsoft.AspNetCore.Testing; | ||
using Xunit.Abstractions; | ||
|
||
namespace Microsoft.AspNetCore.Server.HttpSys.NonHelixTests |
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.
Is there a reason why we don't want these to run on helix?
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.
We never figured out how to make them work there. #8247
/backport to release/6.0-rc2 |
Started backporting to release/6.0-rc2: https://github.com/dotnet/aspnetcore/actions/runs/1247644575 |
@Tratcher backporting to release/6.0-rc2 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Out of proc delegation tests
Applying: Troubleshoot IsFeatureSupported
Applying: Fix test
Applying: Fix formatting
Applying: Fix sln
Using index info to reconstruct a base tree...
M AspNetCore.sln
Falling back to patching base and 3-way merge...
Auto-merging AspNetCore.sln
CONFLICT (content): Merge conflict in AspNetCore.sln
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0005 Fix sln
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
Fixes #28396 (adding out-of-proc test)
When writing the new test we found that this feature regressed on Win11 because Http.Sys requires a new initialization flag for the feature detection API to work.
I also refactored the initialization logic so IsFeatureSupported is only called once at startup.
I plan to backport this to 6.0-rc2. We might also need to backport it to 5.0 if partners get blocked.