-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
HttpProtocolException is not reported properly on initial HTTP/2 settings handshake failure #82168
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThere is an overlook in #71345. When the server doesn't initiate the connection with a proper SETTINGS preface, eg. responding by GOAWAY instead, the Instead, we embed Repro: [ConditionalFact(nameof(SupportsAlpn))]
public async Task Test()
{
using Http2LoopbackServer server = Http2LoopbackServer.CreateServer();
using HttpClient client = CreateHttpClient();
Task<HttpResponseMessage> sendTask = client.GetAsync(server.Address);
Http2LoopbackConnection connection = await server.AcceptConnectionAsync();
await connection.ReadSettingsAsync();
await connection.SendGoAway(0, ProtocolErrors.INTERNAL_ERROR);
var ex = await Assert.ThrowsAsync<HttpRequestException>(() => sendTask);
Assert.IsType<HttpProtocolException>(ex.InnerException);
}
|
Triage: this looks like something straightforward to fix. We should fix it in 8.0. |
There is an overlook in #71345. When the server doesn't initiate the connection with a proper SETTINGS preface, eg. responding by GOAWAY instead, the
InnerException
of theHttpRequestException
being thrown must be aProtocolException
according to #70684.Instead, we embed
ProtocolException
into furtherIOException
-s 2 levels down inProcessIncomingFramesAsync()
.Repro:
The text was updated successfully, but these errors were encountered: