Repository navigation
[HTTP/3] Test failure SendAsync_WithZeroLengthHeaderName_Throws #56292
Copy link
Copy link
Closed
Labels
area-System.Net.Httpdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issuetest-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Milestone
Description
Failures 5/26-7/27 (incl. PRs):
| Day | Failures |
|---|---|
| 7/25 | 2x Official run |
| 7/26 | 3x Official run + 8x PR |
| 7/27 (incomplete day) | 1x Official run + 7x PR |
Test type: System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3_MsQuic
Failure:
System.Net.Quic.QuicConnectionAbortedException : Connection aborted by peer (256).
at System.Net.Quic.Implementations.MsQuic.MsQuicStream.ShutdownCompleted(CancellationToken cancellationToken) in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs:line 576
at System.Net.Test.Common.Http3LoopbackStream.SendResponseBodyAsync(Byte[] content, Boolean isFinal) in /_/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs:line 274
at System.Net.Test.Common.Http3LoopbackStream.SendResponseAsync(HttpStatusCode statusCode, IList`1 headers, String content, Boolean isFinal) in /_/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs:line 235
at System.Net.Test.Common.Http3LoopbackConnection.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content) in /_/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs:line 195
at System.Net.Test.Common.Http3LoopbackServer.HandleRequestAsync(HttpStatusCode statusCode, IList`1 headers, String content) in /_/src/libraries/Common/tests/System/Net/Http/Http3LoopbackServer.cs:line 76
at System.Net.Http.Functional.Tests.HttpClientHandlerTest_Headers.<>c.<<SendAsync_WithZeroLengthHeaderName_Throws>b__16_1>d.MoveNext() in /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs:line 425
--- End of stack trace from previous location ---
at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 63
at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 82
at System.Net.Test.Common.LoopbackServerFactory.<>c__DisplayClass5_0.<<CreateClientAndServerAsync>b__0>d.MoveNext() in /_/src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs:line 39
--- End of stack trace from previous location ---
at System.Net.Test.Common.Http3LoopbackServerFactory.CreateServerAsync(Func`3 funcAsync, Int32 millisecondsTimeout, GenericLoopbackOptions options) in /_/src/libraries/Common/tests/System/Net/Http/Http3LoopbackServer.cs:line 101
at System.Net.Http.Functional.Tests.HttpClientHandlerTest_Headers.SendAsync_WithZeroLengthHeaderName_Throws() in /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs:line 413
--- End of stack trace from previous location ---
Metadata
Metadata
Assignees
Labels
area-System.Net.Httpdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issuetest-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Activity
Disable test SendAsync_WithZeroLengthHeaderName_Throws
Disable test SendAsync_WithZeroLengthHeaderName_Throws (#56363)
wfurt commentedon Jul 28, 2021
This is easy to reproduce. The test actually expects failure e.g. IOException.
The problem is that we throw
My initial reaction was to add it to expected exceptions. But that seems wrong since Quic is not public so there would be no way for users to catch it.
It seems like the right action would be to catch all Quic exceptions and convert them to either HttpRequest or IOExceptions. Thoughts on this @geoffkizer @stephentoub ?
stephentoub commentedon Jul 28, 2021
They can still catch it, just as the base Exception.
In what situation do these exceptions escape unwrapped to the caller? From HttpClient we typically expect all exceptions to be wrapped in an HttpRequestException, or if coming out of a Stream, in an IOException.
wfurt commentedon Jul 28, 2021
Looking at it again, it actually escapes at server side e.g. loopback
So I guess less pressing but what the fix should be? Should Http3 loopback wrap or should we add the alternative Quic exceptions to tests as we see fit?
I'll keep eyes on the client side. I just go to moving up from Quic to focusing on HTTP tests.