Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,23 @@
},
async server =>
{
var connection = await server.EstablishGenericConnectionAsync();
try
{
await server.HandleRequestAsync(headers: new[] { new HttpHeaderData("Foo", new string('a', handler.MaxResponseHeadersLength * 1024)) });
// Do not use HandleRequestAsync. It sends GO_AWAY before sending the response, making client close the connection right after the stream abort.
// QUIC is based on UDP and packet ordering is not preserved, so the connection close might race with the expected stream error in H/3 case.
await connection.ReadRequestDataAsync();
await connection.SendResponseAsync(headers: new[] { new HttpHeaderData("Foo", new string('a', handler.MaxResponseHeadersLength * 1024)) });
}
// Client can respond by closing/aborting the underlying stream while we are still sending the headers, ignore these exceptions
catch (IOException ex) when (ex.InnerException is SocketException se && se.SocketErrorCode == SocketError.Shutdown) { }
#if !WINHTTPHANDLER_TEST
catch (QuicException ex) when (ex.QuicError == QuicError.StreamAborted && ex.ApplicationErrorCode == Http3ExcessiveLoad) {}
catch (QuicException ex) when (ex.QuicError == QuicError.StreamAborted && ex.ApplicationErrorCode == Http3ExcessiveLoad) { }
#endif
finally
{
semaphore.Release();
await connection.DisposeAsync();
}
});
}
Expand Down Expand Up @@ -148,9 +153,13 @@
headers.Add(new HttpHeaderData($"Custom-{i}", new string('a', 480)));
}

var connection = await server.EstablishGenericConnectionAsync();
try
{
await server.HandleRequestAsync(headers: headers);
// Do not use HandleRequestAsync. It sends GO_AWAY before sending the response, making client close the connection right after the stream abort.
// QUIC is based on UDP and packet ordering is not preserved, so the connection close might race with the expected stream error in H/3 case.
await connection.ReadRequestDataAsync();
await connection.SendResponseAsync(headers: new[] { new HttpHeaderData("Foo", new string('a', handler.MaxResponseHeadersLength * 1024)) });

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context

Check failure on line 162 in src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs#L162

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs(162,115): error CS0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The name 'handler' does not exist in the current context
}
// Client can respond by closing/aborting the underlying stream while we are still sending the headers, ignore these exceptions
catch (IOException ex) when (ex.InnerException is SocketException se && se.SocketErrorCode == SocketError.Shutdown) { }
Expand All @@ -160,6 +169,7 @@
finally
{
semaphore.Release();
await connection.DisposeAsync();
}
});
}
Expand Down
Loading