File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Tests/WebApplicationTest/Controllers Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public async Task<IActionResult> DisableBufferingAsync(CancellationToken cancell
2525
2626 var context = _contextAccessor . HttpContext ! ;
2727 var feature = context . Features . GetRequiredFeature < IHttpResponseBodyFeature > ( ) ;
28- feature . DisableBuffering ( ) ; // 无效果,掉不掉用都不使用响应缓冲区
28+ feature . DisableBuffering ( ) ; // 无效果,调不调用都不使用响应缓冲区
2929
3030 context . Response . StatusCode = 200 ;
3131 context . Response . ContentType = "text/plain; charset=utf-8" ;
@@ -35,7 +35,7 @@ public async Task<IActionResult> DisableBufferingAsync(CancellationToken cancell
3535
3636 for ( var i = 0 ; i < 5 ; ++ i )
3737 {
38- var line = $ "this is line { i } \r \n ";
38+ var line = $ "this is line { i } ";
3939 var bytes = Encoding . UTF8 . GetBytes ( line ) ;
4040 // it seems context.Response.Body.WriteAsync() and
4141 // context.Response.BodyWriter.WriteAsync() work exactly the same
@@ -63,7 +63,7 @@ public async Task<IActionResult> EnableBufferingAsync(CancellationToken cancella
6363 var builder = new StringBuilder ( ) ;
6464 for ( var i = 0 ; i < 5 ; ++ i )
6565 {
66- var s = $ "this is line { i } \r \n ";
66+ var s = $ "this is line { i } ";
6767 _ = builder . Append ( s ) ;
6868 await Task . Delay ( 1000 , cancellation ) ;
6969 }
Original file line number Diff line number Diff line change 77 <Nullable >enable</Nullable >
88 </PropertyGroup >
99
10+ <PropertyGroup >
11+ <EmitCompilerGeneratedFiles >true</EmitCompilerGeneratedFiles >
12+ <CompilerGeneratedFilesOutputPath >_Generated</CompilerGeneratedFilesOutputPath >
13+ </PropertyGroup >
14+ <ItemGroup >
15+ <Compile Remove =" _Generated\**\*.g.cs" />
16+ <None Include =" _Generated\**\*.g.cs" />
17+ </ItemGroup >
18+
1019 <ItemGroup >
1120 <PackageReference Include =" Dolly" Version =" 0.0.9" >
1221 <PrivateAssets >all</PrivateAssets >
You can’t perform that action at this time.
0 commit comments