This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/System.Net.Http/tests/FunctionalTests Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments