Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c0cf481

Browse files
geoffkizerstephentoub
authored andcommitted
disable Expect: 100-continue test on WinHttpHandler (#27538)
1 parent 99c083a commit c0cf481

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ await server.AcceptConnectionAsync(async connection =>
6464
[Fact]
6565
public async Task PostAsyncExpect100Continue_FailsAfterContentSendStarted_Throws()
6666
{
67+
if (IsWinHttpHandler)
68+
{
69+
// WinHttpHandler does not support Expect: 100-continue.
70+
return;
71+
}
72+
6773
var contentSending = new TaskCompletionSource<bool>();
6874
var connectionClosed = new TaskCompletionSource<bool>();
6975

@@ -81,7 +87,7 @@ await LoopbackServer.CreateClientAndServerAsync(async url =>
8187
// close the connection; then once the connection is closed, the send will be allowed
8288
// to continue and will fail.
8389
var request = new HttpRequestMessage(HttpMethod.Post, url);
84-
request.Headers.ExpectContinue = true; // use Expect: 100-continue when supported, but the test works regardless
90+
request.Headers.ExpectContinue = true;
8591
request.Content = new SynchronizedSendContent(contentSending, connectionClosed.Task);
8692
await Assert.ThrowsAsync<HttpRequestException>(() => client.SendAsync(request));
8793
}

0 commit comments

Comments
 (0)