Skip to content

Commit 83109c1

Browse files
committed
Fix warnings
1 parent 58a346b commit 83109c1

File tree

46 files changed

+62
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+62
-47
lines changed

projects/features/features-http-body-response/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var app = WebApplication.Create();
55
app.Run(async context =>
66
{
7-
context.Response.Headers.Add("Content-Type", "text/html; charset=utf-8");
7+
context.Response.Headers.Append("Content-Type", "text/html; charset=utf-8");
88
var feature = context.Features.Get<IHttpResponseBodyFeature>();
99
await feature.StartAsync();
1010
await feature.Stream.WriteAsync(Encoding.UTF8.GetBytes("<html><body style=\"font-size:240px;text-align:center;\">Hello 🌍</body></html>"));

projects/features/features-max-request-body-size/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
var str = "<html><body>";
1616
str += $"Max Request Body Size {bodySize.MaxRequestBodySize}(Is Read Only: {bodySize.IsReadOnly}) You can <strong>also</strong> set this value at KestrelServerOptions.Limits.MaxRequestBodySize";
1717
str += "</body></html>";
18-
context.Response.Headers.Add("Content-Type", "text/html");
18+
context.Response.Headers.Append("Content-Type", "text/html");
1919
return context.Response.WriteAsync($"{str}");
2020
});
2121

projects/file-provider/file-provider-custom/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
app.Run(async context =>
1111
{
12-
context.Response.Headers.Add("content-type", "text/html");
12+
context.Response.Headers.Append("content-type", "text/html");
1313

1414
using (var stream = app.Environment.ContentRootFileProvider.GetFileInfo("").CreateReadStream())
1515
{

projects/file-provider/file-provider-physical/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
app.Run(async context =>
66
{
7-
context.Response.Headers.Add("Content-Type", "text/html");
7+
context.Response.Headers.Append("Content-Type", "text/html");
88

99
var contentRoot = app.Environment.ContentRootFileProvider;
1010
var contentPhysical = app.Environment.ContentRootFileProvider as PhysicalFileProvider;

projects/file-provider/serve-static-files-7/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
app.Run(async context =>
1414
{
15-
context.Response.Headers.Add("content-type", "text/html");
15+
context.Response.Headers.Append("content-type", "text/html");
1616

1717
await context.Response.WriteAsync(@"
1818
<html>

projects/file-provider/serve-static-files-8/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
app.Run(async context =>
2525
{
26-
context.Response.Headers.Add("content-type", "text/html");
26+
context.Response.Headers.Append("content-type", "text/html");
2727

2828
await context.Response.WriteAsync(@"
2929
<html>

projects/health-check/health-check-5/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{
2323
ResponseWriter = async (context, health) =>
2424
{
25-
context.Response.Headers.Add("Content-Type", "text/plain");
25+
context.Response.Headers.Append("Content-Type", "text/plain");
2626

2727
if (health.Status == HealthStatus.Healthy)
2828
await context.Response.WriteAsync("Everything is good");

projects/health-check/health-check-6/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{
2323
ResponseWriter = async (context, health) =>
2424
{
25-
context.Response.Headers.Add("Content-Type", "text/plain");
25+
context.Response.Headers.Append("Content-Type", "text/plain");
2626

2727
if (health.Status == HealthStatus.Healthy)
2828
await context.Response.WriteAsync("Everything is good");

projects/httpclientfactory/httpclientfactory-1/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
var client = httpClient.CreateClient();
1010
var result = await client.GetStringAsync("http://scripting.com/rss.xml");
1111

12-
context.Response.Headers.Add("Content-Type", "application/rss+xml");
12+
context.Response.Headers.Append("Content-Type", "application/rss+xml");
1313
await context.Response.WriteAsync(result);
1414
});
1515

projects/httpclientfactory/httpclientfactory-2/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
var client = httpClient.CreateClient("rss"); // use the preconfigured http client
1515
var result = await client.GetStringAsync("http://scripting.com/rss.xml");
1616

17-
context.Response.Headers.Add("Content-Type", "application/rss+xml");
17+
context.Response.Headers.Append("Content-Type", "application/rss+xml");
1818
await context.Response.WriteAsync(result);
1919
});
2020

0 commit comments

Comments
 (0)