Skip to content

Commit 3c7a472

Browse files
committed
Update
1 parent 6a466b5 commit 3c7a472

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/Tests/WebApplicationTest/Controllers/KestrelTestController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

src/plugins/CloneTest/CloneTest.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
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>

0 commit comments

Comments
 (0)