75 references to Accept
CodeGenerator (2)
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
94HeaderNames.Accept, 144HeaderNames.Accept,
InMemory.FunctionalTests (2)
Http2\Http2StreamTests.cs (1)
2552Assert.Equal("Custom 你好 Accept", _decodedHeaders[HeaderNames.Accept]);
Http3\Http3StreamTests.cs (1)
1060Assert.Equal("Custom 你好 Accept", responseTrailers[HeaderNames.Accept]);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (4)
Logging\AcceptanceTests.cs (2)
277x.RequestHeadersDataClasses.Add(HeaderNames.Accept, DataClassification.None); 348x.RequestHeadersDataClasses.Add(HeaderNames.Accept, DataClassification.None);
Logging\HeaderReaderTests.cs (2)
22var headers = new HeaderDictionary(new Dictionary<string, StringValues> { [HeaderNames.Accept] = MediaTypeNames.Text.Plain }); 30var reader = new HeaderReader(new Dictionary<string, DataClassification> { [HeaderNames.Accept] = DataClassification.Unknown }, null!, string.Empty);
Microsoft.AspNetCore.HeaderParsing (1)
CommonHeaders.cs (1)
25public static HeaderSetup<IReadOnlyList<MediaTypeHeaderValue>> Accept => new(HeaderNames.Accept, MediaTypeHeaderValueListParser.Instance);
Microsoft.AspNetCore.HeaderParsing.Tests (1)
CommonHeadersTests.cs (1)
23Assert.Equal(HeaderNames.Accept, CommonHeaders.Accept.HeaderName);
Microsoft.AspNetCore.Http.Extensions (1)
RequestHeaders.cs (1)
42Headers.SetList(HeaderNames.Accept, value);
Microsoft.AspNetCore.Http.Extensions.Tests (4)
HeaderDictionaryTypeExtensionsTest.cs (4)
170var result = context.Request.GetTypedHeaders().GetList<MediaTypeHeaderValue>(HeaderNames.Accept); 185var result = context.Request.GetTypedHeaders().GetList<MediaTypeHeaderValue>(HeaderNames.Accept); 196var result = context.Request.GetTypedHeaders().GetList<MediaTypeHeaderValue>(HeaderNames.Accept); 207var result = context.Request.GetTypedHeaders().GetList<StringWithQualityHeaderValue>(HeaderNames.Accept);
Microsoft.AspNetCore.Http.Features (2)
IHeaderDictionary.Keyed.cs (2)
11StringValues Accept { get => this[HeaderNames.Accept]; set => this[HeaderNames.Accept] = value; }
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingOptions.cs (1)
34HeaderNames.Accept,
Microsoft.AspNetCore.OpenApi (1)
Services\OpenApiDocumentService.cs (1)
53private static readonly FrozenSet<string> _disallowedHeaderParameters = new[] { HeaderNames.Accept, HeaderNames.Authorization, HeaderNames.ContentType }.ToFrozenSet(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheEntryFormatter.cs (1)
397HeaderNames.Accept,
Microsoft.AspNetCore.OutputCaching.Tests (3)
OutputCacheEntryFormatterTests.cs (3)
51.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.Accept] = new[] { "text/plain", "text/html" }, [HeaderNames.AcceptCharset] = "utf8" }) 70entry.CopyHeadersFrom(new HeaderDictionary { [""] = "", [HeaderNames.Accept] = new[] { null, null, "", "text/html" }, [HeaderNames.AcceptCharset] = new string[] { null } }); 84Assert.True(result.TryFindHeader(HeaderNames.Accept, out values));
Microsoft.AspNetCore.Rewrite (2)
ApacheModRewrite\ServerVariables.cs (1)
26return new HeaderSegment(HeaderNames.Accept);
IISUrlRewrite\ServerVariables.cs (1)
40managedVariableThunk = () => new HeaderSegment(HeaderNames.Accept);
Microsoft.AspNetCore.Server.HttpSys (7)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (7)
1087if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1300if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1548if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1830if (string.Equals(key, HeaderNames.Accept, StringComparison.Ordinal)) 2203yield return HeaderNames.Accept; 2539yield return new KeyValuePair<string, StringValues>(HeaderNames.Accept, Accept); 2750HttpSysRequestHeader.Accept => HeaderNames.Accept,
Microsoft.AspNetCore.Server.IIS (7)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (7)
1087if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1300if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1548if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1830if (string.Equals(key, HeaderNames.Accept, StringComparison.Ordinal)) 2203yield return HeaderNames.Accept; 2539yield return new KeyValuePair<string, StringValues>(HeaderNames.Accept, Accept); 2750HttpSysRequestHeader.Accept => HeaderNames.Accept,
Microsoft.AspNetCore.Server.Kestrel.Core (20)
Internal\Http\HttpHeaders.Generated.cs (20)
284HeaderNames.Accept, 2742if (ReferenceEquals(HeaderNames.Accept, key)) 2788if (HeaderNames.Accept.Equals(key, StringComparison.OrdinalIgnoreCase)) 3709if (ReferenceEquals(HeaderNames.Accept, key)) 3740if (HeaderNames.Accept.Equals(key, StringComparison.OrdinalIgnoreCase)) 4472if (ReferenceEquals(HeaderNames.Accept, key)) 4523if (HeaderNames.Accept.Equals(key, StringComparison.OrdinalIgnoreCase)) 5579if (ReferenceEquals(HeaderNames.Accept, key)) 5630if (HeaderNames.Accept.Equals(key, StringComparison.OrdinalIgnoreCase)) 7028array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Accept, _headers._Accept); 7581nameStr = HeaderNames.Accept; 7977nameStr = HeaderNames.Accept; 8216nameStr = HeaderNames.Accept; 8404_current = new KeyValuePair<string, StringValues>(HeaderNames.Accept, _collection._headers._Accept); 9926if (!TryGetUnknown(HeaderNames.Accept, ref value)) 9935ValidateHeaderValueCharacters(HeaderNames.Accept, value, EncodingSelector); 9936SetValueUnknown(HeaderNames.Accept, value); 15623if (!TryGetUnknown(HeaderNames.Accept, ref value)) 15632ValidateHeaderValueCharacters(HeaderNames.Accept, value, EncodingSelector); 15633SetValueUnknown(HeaderNames.Accept, value);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (8)
HttpRequestHeadersTests.cs (2)
670var acceptNameBytes = Encoding.ASCII.GetBytes(HeaderNames.Accept); 677if (ReferenceEquals(headerName, HeaderNames.Accept))
HttpUtilitiesTest.cs (2)
250HttpUtilities.GetRequestHeaderString(encodedBytes.AsSpan(), HeaderNames.Accept, selector, checkForNewlineChars: true)); 258HttpUtilities.GetRequestHeaderString(encodedBytes.AsSpan(), HeaderNames.Accept, selector, checkForNewlineChars: false);
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
94HeaderNames.Accept, 144HeaderNames.Accept,
UTF8Decoding.cs (2)
21var s = HttpUtilities.GetRequestHeaderString(encodedBytes.AsSpan(), HeaderNames.Accept, KestrelServerOptions.DefaultHeaderEncodingSelector, checkForNewlineChars: false); 40HttpUtilities.GetRequestHeaderString(byteRange.AsSpan(), HeaderNames.Accept, KestrelServerOptions.DefaultHeaderEncodingSelector, checkForNewlineChars: false));
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
BytesToStringBenchmark.cs (1)
40_headerName = HeaderNames.Accept;
Microsoft.AspNetCore.Shared.Tests (7)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (7)
1087if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1300if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1548if (string.Equals(key, HeaderNames.Accept, StringComparison.OrdinalIgnoreCase)) 1830if (string.Equals(key, HeaderNames.Accept, StringComparison.Ordinal)) 2203yield return HeaderNames.Accept; 2539yield return new KeyValuePair<string, StringValues>(HeaderNames.Accept, Accept); 2750HttpSysRequestHeader.Accept => HeaderNames.Accept,