Skip to content

Commit

Permalink
HTTP/3 GET Aborted stress scenario fix (#55582)
Browse files Browse the repository at this point in the history
This adds checks for HTTP/3 specific exceptions to GET Aborted scenario
  • Loading branch information
CarnaViire authored Jul 14, 2021
1 parent 21a7632 commit 8bf8030
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,32 @@ public static (string name, Func<RequestContext, Task> operation)[] Operations =
}
}
if (ctx.HttpVersion == HttpVersion.Version30)
{
// HTTP/3 exception nesting:
// HttpRequestException->IOException->HttpRequestException->QuicStreamAbortedException
// HttpRequestException->QuicStreamAbortedException
if (e is IOException && e.InnerException is HttpRequestException)
{
e = e.InnerException;
}
if (e is HttpRequestException)
{
string? name = e.InnerException?.GetType().Name;
switch (name)
{
case "QuicStreamAbortedException":
if (e.InnerException?.Message?.Equals("Stream aborted by peer (258).") ?? false) // 258 = H3_INTERNAL_ERROR (0x102)
{
return;
}
break;
}
}
}
throw;
}
}),
Expand Down

0 comments on commit 8bf8030

Please sign in to comment.