File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
Common.FunctionalTests/Inprocess
testassets/InProcessWebSite Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ protected Task CompleteResponseBodyAsync()
206
206
return ResponsePipeWrapper . CompleteAsync ( ) . AsTask ( ) ;
207
207
}
208
208
209
- return Task . CompletedTask ;
209
+ return AsyncIO . FlushAsync ( moreData : false ) . AsTask ( ) ;
210
210
}
211
211
212
212
bool IHttpUpgradeFeature . IsUpgradableRequest => true ;
Original file line number Diff line number Diff line change @@ -26,5 +26,11 @@ public async Task HelloWorld_InProcess()
26
26
27
27
Assert . Equal ( "?query" , await _fixture . Client . GetStringAsync ( "/HelloWorld/Query%3F%3F?query" ) ) ;
28
28
}
29
+
30
+ [ ConditionalFact ]
31
+ public async Task CheckCompleteAsync ( )
32
+ {
33
+ await _fixture . Client . GetStringAsync ( "/CompleteAsync" ) ;
34
+ }
29
35
}
30
36
}
Original file line number Diff line number Diff line change @@ -1315,6 +1315,25 @@ public async Task Reset_DuringRequestBody_Resets(HttpContext httpContext)
1315
1315
}
1316
1316
}
1317
1317
1318
+ public Task Goaway ( HttpContext httpContext )
1319
+ {
1320
+ httpContext . Response . Headers [ "Connection" ] = "close" ;
1321
+ return Task . CompletedTask ;
1322
+ }
1323
+
1324
+ private TaskCompletionSource < object > _completeAsync = new TaskCompletionSource < object > ( ) ;
1325
+ public async Task CompleteAsync ( HttpContext httpContext )
1326
+ {
1327
+ await httpContext . Response . CompleteAsync ( ) ;
1328
+ await _completeAsync . Task ;
1329
+ }
1330
+
1331
+ public Task CompleteAsync_Completed ( HttpContext httpContext )
1332
+ {
1333
+ _completeAsync . TrySetResult ( null ) ;
1334
+ return Task . CompletedTask ;
1335
+ }
1336
+
1318
1337
public async Task Reset_DuringRequestBody_Resets_Complete ( HttpContext httpContext )
1319
1338
{
1320
1339
await _resetDuringRequestBodyResetsCts . Task ;
You can’t perform that action at this time.
0 commit comments