16 writes to ContentType
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
132Headers.ContentType = contentTypeHeaderValue;
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
372requestContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("text/plain");
Microsoft.AspNetCore.HttpLogging.Tests (2)
HttpLoggingMiddlewareTests.cs (2)
1777request.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("text/plain"); 1867request.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("text/plain");
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
SimpleWithWebApplicationBuilderTests.cs (2)
234request.Content.Headers.ContentType = new("application/xml"); 249request.Content.Headers.ContentType = new("application/xml");
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
NoRemoteCallHandler.cs (1)
44response.Content.Headers.ContentType = new("application/json");
NoRemoteCallNotSeekableHandler.cs (1)
47response.Content.Headers.ContentType = new("application/json");
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Logging\HttpHeadersReaderTest.cs (2)
132requestContent.Headers.ContentType = new(MediaTypeNames.Application.Soap); 141responseContent.Headers.ContentType = new(MediaTypeNames.Text.Html);
Logging\Internal\NoRemoteCallHandler.cs (1)
38response.Content.Headers.ContentType = new("application/json");
System.Net.Http (4)
System\Net\Http\FormUrlEncodedContent.cs (1)
23Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
System\Net\Http\MultipartContent.cs (1)
59Headers.ContentType = contentType;
System\Net\Http\StringContent.cs (2)
73Headers.ContentType = new MediaTypeHeaderValue(mediaType, encoding.WebName); 83Headers.ContentType = mediaType;
System.Net.Http.Json (1)
System\Net\Http\Json\JsonContent.cs (1)
35Headers.ContentType = mediaType;
283 references to ContentType
AuthSamples.FunctionalTests (1)
TestAssert.cs (1)
76Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType);
dotnet-svcutil-lib (5)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageHelper.cs (2)
132var mediaValueContentType = content.Headers.ContentType; 341throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ProtocolException(string.Format(SRServiceModel.FramingContentTypeMismatch, _httpRequestMessage.Content.Headers.ContentType.ToString(), _httpRequestMessage.RequestUri)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (3)
96var actionParams = (from p in Headers.ContentType.Parameters where p.Name == "action" select p).ToArray(); 113new ProtocolException(string.Format(SRServiceModel.HttpContentTypeFormatException, formatException.Message, Headers.ContentType.ToString()), formatException)); 120Headers.ContentType.Parameters.Add(new NameValueHeaderValue("action", action));
InMemory.FunctionalTests (1)
TestTransport\InMemoryHttpClientSlim.cs (1)
80await writer.WriteAsync($"Content-Type: {content.Headers.ContentType}\r\n").ConfigureAwait(false);
Microsoft.AspNetCore.Authentication.OpenIdConnect (5)
OpenIdConnectHandler.cs (5)
611var contentType = parResponseMessage.Content.Headers.ContentType; 996var contentMediaType = responseMessage.Content.Headers.ContentType?.MediaType; 1005Logger.LogDebug($"Unexpected token response format. Status Code: {(int)responseMessage.StatusCode}. Content-Type {responseMessage.Content.Headers.ContentType}."); 1021throw new OpenIdConnectProtocolException($"Failed to parse token response body as JSON. Status Code: {(int)responseMessage.StatusCode}. Content-Type: {responseMessage.Content.Headers.ContentType}", ex); 1065var contentType = responseMessage.Content.Headers.ContentType;
Microsoft.AspNetCore.Authentication.Test (25)
CertificateTests.cs (14)
470response.Content.Headers.ContentType != null && 471response.Content.Headers.ContentType.MediaType == "text/xml") 601response.Content.Headers.ContentType != null && 602response.Content.Headers.ContentType.MediaType == "text/xml") 620response.Content.Headers.ContentType != null && 621response.Content.Headers.ContentType.MediaType == "text/xml") 671response.Content.Headers.ContentType != null && 672response.Content.Headers.ContentType.MediaType == "text/xml") 728response.Content.Headers.ContentType != null && 729response.Content.Headers.ContentType.MediaType == "text/xml") 747response.Content.Headers.ContentType != null && 748response.Content.Headers.ContentType.MediaType == "text/xml") 769response.Content.Headers.ContentType != null && 770response.Content.Headers.ContentType.MediaType == "text/xml")
CookieTests.cs (2)
1926transaction.Response.Content.Headers.ContentType != null && 1927transaction.Response.Content.Headers.ContentType.MediaType == "text/xml")
JwtBearerTests.cs (2)
1265transaction.Response.Content.Headers.ContentType != null && 1266transaction.Response.Content.Headers.ContentType.MediaType == "text/xml")
JwtBearerTests_Handler.cs (2)
1324transaction.Response.Content.Headers.ContentType != null && 1325transaction.Response.Content.Headers.ContentType.MediaType == "text/xml")
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
165Assert.Equal("text/html", transaction.Response.Content.Headers.ContentType.MediaType);
OpenIdConnect\TestServerExtensions.cs (2)
42transaction.Response.Content.Headers.ContentType != null && 43transaction.Response.Content.Headers.ContentType.MediaType == "text/xml")
TestExtensions.cs (2)
37transaction.Response.Content.Headers.ContentType != null && 38transaction.Response.Content.Headers.ContentType.MediaType == "text/xml")
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
358var contentTypeIsJson = string.Equals(response.Content.Headers.ContentType?.MediaType ?? "", "application/json", StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.CookiePolicy.Test (2)
TestExtensions.cs (2)
34transaction.Response.Content.Headers.ContentType != null && 35transaction.Response.Content.Headers.ContentType.MediaType == "text/xml")
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (22)
HealthCheckEndpointRouteBuilderExtensionsTest.cs (2)
81Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 126Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
HealthCheckMiddlewareSampleTest.cs (4)
31Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 53Assert.Equal("application/json", response.Content.Headers.ContentType.ToString()); 76Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 98Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
HealthCheckMiddlewareTests.cs (16)
122Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 152Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 185Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 218Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 251Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 284Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 329Assert.Equal("application/json", response.Content.Headers.ContentType.ToString()); 505Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 535Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 593Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 658Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 695Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 733Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 771Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 851Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 895Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.Diagnostics.Tests (3)
DeveloperExceptionPageMiddlewareTest.cs (3)
261Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 296Assert.Equal("text/plain", response.Content.Headers.ContentType.MediaType); 297Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet);
Microsoft.AspNetCore.Identity.FunctionalTests (3)
Extensions\ResponseAssert.cs (1)
24Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType);
MapIdentityApiTests.cs (2)
1449Assert.Equal("application/problem+json", response.Content.Headers.ContentType?.ToString()); 1459Assert.Equal("application/problem+json", response.Content.Headers.ContentType?.ToString());
Microsoft.AspNetCore.Identity.InMemory.Test (2)
FunctionalTest.cs (2)
455transaction.Response.Content.Headers.ContentType != null && 456transaction.Response.Content.Headers.ContentType.MediaType == "text/xml")
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
82await writer.WriteAsync($"Content-Type: {content.Headers.ContentType}\r\n").ConfigureAwait(false);
Microsoft.AspNetCore.Mvc.FunctionalTests (174)
ApiBehaviorTest.cs (2)
62Assert.Equal("application/problem+json", response.Content.Headers.ContentType.MediaType); 451Assert.Equal("application/vnd.error+json", response.Content.Headers.ContentType.MediaType);
BasicTests.cs (8)
56Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 76Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 100Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 120Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 152Assert.Null(response.Content.Headers.ContentType); 246Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 269Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 292Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType);
ContentNegotiationTest.cs (21)
49Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 66Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 82Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 97Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 117Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 136Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 161Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 179Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 221var contentType = response.Content.Headers.ContentType; 242Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 260Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 277Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 294Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 312Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 328Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 353Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 375Assert.Equal("text/plain; charset=utf-8", response.Content.Headers.ContentType.ToString()); 393Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 496Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 514Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 535Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString());
CustomValueProviderTest.cs (4)
51Assert.Equal("text/plain", response.Content.Headers.ContentType.MediaType); 68Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 85Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 102Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType);
DoNotRespectBrowserAcceptHeaderTests.cs (8)
52Assert.NotNull(response.Content.Headers.ContentType); 53Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 80Assert.NotNull(response.Content.Headers.ContentType); 81Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString()); 109Assert.NotNull(response.Content.Headers.ContentType); 112Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 140Assert.NotNull(response.Content.Headers.ContentType); 141Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString());
ErrorPageTests.cs (5)
67Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 102Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 123Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 143Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 161Assert.Equal(expectedMediaType, response.Content.Headers.ContentType);
FileResultTests.cs (78)
44Assert.NotNull(response.Content.Headers.ContentType); 45Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 67Assert.NotNull(response.Content.Headers.ContentType); 68Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 89Assert.NotNull(response.Content.Headers.ContentType); 90Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 109Assert.NotNull(response.Content.Headers.ContentType); 110Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 131Assert.NotNull(response.Content.Headers.ContentType); 132Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 153Assert.NotNull(response.Content.Headers.ContentType); 154Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 173Assert.NotNull(response.Content.Headers.ContentType); 174Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 191Assert.NotNull(response.Content.Headers.ContentType); 192Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 217Assert.NotNull(response.Content.Headers.ContentType); 218Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 236Assert.NotNull(response.Content.Headers.ContentType); 237Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 256Assert.NotNull(response.Content.Headers.ContentType); 257Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 289Assert.NotNull(response.Content.Headers.ContentType); 290Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 314Assert.NotNull(response.Content.Headers.ContentType); 315Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 331Assert.NotNull(response.Content.Headers.ContentType); 332Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 353Assert.NotNull(response.Content.Headers.ContentType); 354Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 376Assert.NotNull(response.Content.Headers.ContentType); 377Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 397Assert.NotNull(response.Content.Headers.ContentType); 398Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 412Assert.NotNull(response.Content.Headers.ContentType); 413Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 438Assert.NotNull(response.Content.Headers.ContentType); 439Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 457Assert.NotNull(response.Content.Headers.ContentType); 458Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 508Assert.NotNull(response.Content.Headers.ContentType); 509Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 532Assert.NotNull(response.Content.Headers.ContentType); 533Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 555Assert.NotNull(response.Content.Headers.ContentType); 556Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 577Assert.NotNull(response.Content.Headers.ContentType); 578Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 597Assert.NotNull(response.Content.Headers.ContentType); 598Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 601Assert.NotNull(response.Content.Headers.ContentType); 602Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 616Assert.NotNull(response.Content.Headers.ContentType); 617Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 642Assert.NotNull(response.Content.Headers.ContentType); 643Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 661Assert.NotNull(response.Content.Headers.ContentType); 662Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 681Assert.NotNull(response.Content.Headers.ContentType); 682Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 714Assert.NotNull(response.Content.Headers.ContentType); 715Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 741Assert.NotNull(response.Content.Headers.ContentType); 742Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 768Assert.NotNull(response.Content.Headers.ContentType); 769Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 792Assert.NotNull(response.Content.Headers.ContentType); 793Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 811Assert.NotNull(response.Content.Headers.ContentType); 812Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 834Assert.NotNull(response.Content.Headers.ContentType); 835Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 858Assert.NotNull(response.Content.Headers.ContentType); 859Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 881Assert.NotNull(response.Content.Headers.ContentType); 882Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 918Assert.NotNull(response.Content.Headers.ContentType); 919Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
HtmlGenerationTest.cs (5)
114Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 139Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 231Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 271Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 310Assert.Equal(expectedMediaType, response.Content.Headers.ContentType);
InputFormatterTests.cs (4)
227Assert.Null(content.Headers.ContentType); 272Assert.Null(content.Headers.ContentType); 287Assert.Null(content.Headers.ContentType); 302Assert.Null(content.Headers.ContentType);
JsonResultWithNewtonsoftJsonTest.cs (5)
51Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 73Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 91Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 109Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 142Assert.Equal("application/message+json", response.Content.Headers.ContentType.MediaType);
JsonResultWithSystemTextJsonTest.cs (5)
51Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 73Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 91Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 109Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 142Assert.Equal("application/message+json", response.Content.Headers.ContentType.MediaType);
LinkGenerationTests.cs (1)
88Assert.Equal(expectedMediaType, response.Content.Headers.ContentType);
OutputFormatterTest.cs (5)
46Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 63Assert.Equal(expectedContentType, response.Content.Headers.ContentType); 75Assert.Null(response.Content.Headers.ContentType); 93Assert.Null(response.Content.Headers.ContentType); 113Assert.Null(response.Content.Headers.ContentType);
RazorPagesTest.cs (5)
56Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 898Assert.NotNull(response.Content.Headers.ContentType); 899Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 914Assert.NotNull(response.Content.Headers.ContentType); 915Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType);
RemoteAttributeValidationTest.cs (6)
49Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 50Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet); 74Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 75Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet); 103Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 104Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet);
RespectBrowserAcceptHeaderTests.cs (4)
52Assert.NotNull(response.Content.Headers.ContentType); 53Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 71Assert.NotNull(response.Content.Headers.ContentType); 72Assert.Equal("text/plain; charset=utf-8", response.Content.Headers.ContentType.ToString());
SerializableErrorTests.cs (4)
60Assert.NotNull(response.Content.Headers.ContentType); 61Assert.Equal(acceptHeader, response.Content.Headers.ContentType.MediaType); 84Assert.NotNull(response.Content.Headers.ContentType); 85Assert.Equal(acceptHeader, response.Content.Headers.ContentType.MediaType);
StreamOutputFormatterTest.cs (1)
42Assert.Equal(contentType, response.Content.Headers.ContentType?.ToString());
TagHelpersTest.cs (3)
62Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 99Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); 120Assert.Equal(expectedMediaType, response.Content.Headers.ContentType);
Microsoft.AspNetCore.Routing.FunctionalTests (10)
Benchmarks\EndpointRoutingBenchmarkTest.cs (2)
51Assert.NotNull(response.Content.Headers.ContentType); 52Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType);
Benchmarks\RouterBenchmarkTest.cs (2)
52Assert.NotNull(response.Content.Headers.ContentType); 53Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType);
EndpointRoutingSampleTest.cs (6)
58Assert.NotNull(response.Content.Headers.ContentType); 59Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType); 75Assert.NotNull(response.Content.Headers.ContentType); 76Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType); 94Assert.NotNull(response.Content.Headers.ContentType); 95Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType);
Microsoft.AspNetCore.StaticAssets.Tests (6)
StaticAssetsIntegrationTests.cs (6)
66Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 116Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 168Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 337Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 390Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 446Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.StaticFiles.FunctionalTests (2)
StaticFileMiddlewareTests.cs (2)
163Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 205Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.StaticFiles.Tests (12)
DirectoryBrowserMiddlewareTests.cs (3)
171Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString()); 228Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString()); 371Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString());
RangeHeaderTests.cs (2)
426Assert.Equal("text/plain", resp.Content.Headers.ContentType.ToString()); 446Assert.Equal("text/plain", resp.Content.Headers.ContentType.ToString());
StaticFileMiddlewareTests.cs (7)
190Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 229Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 271Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 321Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 364Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 412Assert.Equal("text/customfortest+plain", response.Content.Headers.ContentType.ToString()); 482Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.TestHost.Tests (1)
RequestBuilderTests.cs (1)
33Assert.Equal("Test/Value", request.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.Tests (3)
WebApplicationTests.cs (3)
2042Assert.Contains("text/plain", response.Content.Headers.ContentType.MediaType); 2147Assert.Contains("text/plain", response.Content.Headers.ContentType.MediaType); 2172Assert.Null(response.Content.Headers.ContentType);
Microsoft.Extensions.Http.Diagnostics (2)
Logging\Internal\HttpRequestBodyReader.cs (1)
54var contentType = request.Content.Headers.ContentType;
Logging\Internal\HttpResponseBodyReader.cs (1)
46var contentType = response.Content.Headers.ContentType;
System.Net.Http (1)
System\Net\Http\HttpContent.cs (1)
176string? charset = headers.ContentType?.CharSet;
System.Net.Http.Json (1)
System\Net\Http\Json\JsonHelpers.cs (1)
34if (content.Headers.ContentType?.CharSet is string charset)