5 writes to Name
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
src\Servers\Kestrel\shared\KnownHeaders.cs (5)
182
Name
= header,
191
Name
= HeaderNames.ContentLength,
253
Name
= header,
262
Name
= HeaderNames.ContentLength,
280
Name
= header,
77 references to Name
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (77)
HttpRequestHeadersTests.cs (4)
891
RequestHeaders.Where(h => h.
Name
!= "Content-Length").Select(h => new object[] { true, h.
Name
}).Concat(
892
RequestHeaders.Where(h => h.
Name
!= "Content-Length").Select(h => new object[] { false, h.
Name
}));
src\Servers\Kestrel\shared\KnownHeaders.cs (73)
298
.Where(header => invalidH2H3ResponseHeaders.Contains(header.
Name
))
378
if (header.
Name
== HeaderNames.ContentLength)
420
if (header.
Name
== HeaderNames.ContentLength)
468
public string Identifier => ResolveIdentifier(
Name
);
470
public string StaticIdentifier => ResolveIdentifier(
Name
, ClassName);
472
public byte[] Bytes => Encoding.ASCII.GetBytes($"\r\n{
Name
}: ");
572
if (
Name
.Length >= 8)
574
result = NameTerm(
Name
, 0, 8, "ulong", "uL");
576
else if (
Name
.Length >= 4)
578
result = NameTerm(
Name
, 0, 4, "uint", "u");
580
else if (
Name
.Length >= 2)
582
result = NameTerm(
Name
, 0, 2, "ushort", "u");
586
result = NameTerm(
Name
, 0, 1, "byte", "u");
602
while (index !=
Name
.Length)
604
if (
Name
.Length - index >= 8)
606
result += delim + Term(
Name
, index, 8, "ulong", "uL");
609
else if (
Name
.Length - index >= 4)
611
result += delim + Term(
Name
, index, 4, "uint", "u");
614
else if (
Name
.Length - index >= 2)
616
result += delim + Term(
Name
, index, 2, "ushort", "u");
621
result += delim + Term(
Name
, index, 1, "byte", "u");
634
while (index !=
Name
.Length)
636
if (
Name
.Length - index >= 8)
640
result = $"({firstTermVar} == {EqualityTerm(
Name
, index, 8, "uL")})";
644
result += delim + Term(
Name
, index, 8, "ulong", "uL");
649
else if (
Name
.Length - index >= 4)
653
result = $"({firstTermVar} == {EqualityTerm(
Name
, index, 4, "u")})";
657
result += delim + Term(
Name
, index, 4, "uint", "u");
661
else if (
Name
.Length - index >= 2)
665
result = $"({firstTermVar} == {EqualityTerm(
Name
, index, 2, "u")})";
669
result += delim + Term(
Name
, index, 2, "ushort", "u");
677
result = $"({firstTermVar} == {EqualityTerm(
Name
, index, 1, "u")})";
681
result += delim + Term(
Name
, index, 1, "byte", "u");
695
if (
Name
.Length >= 8)
697
result = Term(
Name
, 0, 8, "ulong", "uL");
699
else if (
Name
.Length >= 4)
701
result = Term(
Name
, 0, 4, "uint", "u");
703
else if (
Name
.Length >= 2)
705
result = Term(
Name
, 0, 2, "ushort", "u");
709
result = Term(
Name
, 0, 1, "byte", "u");
721
while (index !=
Name
.Length)
723
if (
Name
.Length - index >= 8)
727
result += delim + Term(
Name
, index, 8, "ulong", "uL");
732
else if (
Name
.Length - index >= 4)
736
result += delim + Term(
Name
, index, 4, "uint", "u");
740
else if (
Name
.Length - index >= 2)
744
result += delim + Term(
Name
, index, 2, "ushort", "u");
752
result += delim + Term(
Name
, index, 1, "byte", "u");
791
HeadersByLength = requestHeaders.OrderBy(x => x.
Name
.Length).GroupBy(x => x.
Name
.Length),
798
HeadersByLength = responseHeaders.OrderBy(x => x.
Name
.Length).GroupBy(x => x.
Name
.Length),
805
HeadersByLength = responseTrailers.OrderBy(x => x.
Name
.Length).GroupBy(x => x.
Name
.Length),
868
{Each(loop.Headers.Where(header => Array.IndexOf(InternalHeaderAccessors, header.
Name
) >= 0), header => $@"
869
public {(header.
Name
== HeaderNames.Connection ? "override " : "")}StringValues Header{header.Identifier}
870
{{{(header.
Name
== HeaderNames.ContentLength ? $@"
906
{Each(loop.Headers.Where(header => header.
Name
!= HeaderNames.ContentLength && !NonApiHeaders.Contains(header.Identifier)), header => $@"
976
{{{(header.
Name
== HeaderNames.ContentLength ? @"
992
{{{(header.
Name
== HeaderNames.ContentLength ? @"
1021
{{{(header.
Name
== HeaderNames.ContentLength ? $@"
1030
{{{(header.
Name
== HeaderNames.ContentLength ? $@"
1052
{{{(header.
Name
== HeaderNames.ContentLength ? $@"
1070
{{{(header.
Name
== HeaderNames.ContentLength ? $@"
1100
{{{(header.
Name
== HeaderNames.ContentLength ? @"
1118
{{{(header.
Name
== HeaderNames.ContentLength ? @"
1241
case {header.Index}: // Header: ""{header.
Name
}""
1324
{AppendSwitch(loop.Headers.GroupBy(x => x.
Name
.Length).OrderBy(x => x.Key))}
1397
case {header.Index}: // Header: ""{header.
Name
}""
1508
Header = headers.SingleOrDefault(knownHeader => string.Equals(knownHeader.
Name
, g.Key, StringComparison.OrdinalIgnoreCase)),
1529
Header = headers.SingleOrDefault(knownHeader => string.Equals(knownHeader.
Name
, g.Key, StringComparison.OrdinalIgnoreCase)),
1568
return StringComparer.InvariantCulture.Compare(x.
Name
, y.
Name
);