Description
Background
#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.