HttpSys HTTP_SEND_RESPONSE_FLAG_GOAWAY detection side effects
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Background
https://github.com/aspnet/AspNetCore/pull/14522 added 3.1 support for HttpSys GoAway via a new flag HTTP_SEND_RESPONSE_FLAG_GOAWAY. OS support for the new flag is detected by checking for an Invalid Parameter error on first use and trying again without it.
### Describe the bug
The invalid parameter error is working as expected on the server, but it has an unexpected side-effect on the client. The client receives a RST_STREAM (Cancel) error rather than the expected headers for the response that included the HTTP_SEND_RESPONSE_FLAG_GOAWAY flag. This only happens for the first response with the new flag because the flag is disabled for the remainder of the application.
Reproed on Win10 19H1 1903 (18362.418).
I'm following up with Http.Sys but we may have to find an alternate detection mechanic here. Skipping the new negative test for now. Edit: Confirmed, Http.Sys cancels requests when it encounters invalid parameters. We need a different detection mechanism.
Depending on the solution, we might want to patch 3.1.
Contributor guide
Research direction
Start by reading the HttpSys GoAway support introduced in PR #14522 and reproduce the first-response behavior on the reported Windows version. The fix is complete when capability detection no longer sends invalid parameters that cause a client RST_STREAM, while responses carrying HTTP_SEND_RESPONSE_FLAG_GOAWAY still receive their expected headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100