Skip to content

Commit 9288627

Browse files
committed
Fixing up build issues
1 parent afb1f48 commit 9288627

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<Compile Include="$(SharedSourceRoot)HttpSys\**\*.cs" />
1616
<Compile Include="$(SharedSourceRoot)Buffers.MemoryPool\*.cs" LinkBase="MemoryPool" />
1717
<Compile Include="$(SharedSourceRoot)ServerInfrastructure\*.cs" LinkBase="ServerInfrastructure" />
18+
<Compile Include="$(SharedSourceRoot)TaskToApm.cs" />
1819
</ItemGroup>
1920

2021
<ItemGroup>

src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ public static unsafe string GetAsciiStringNonNullCharacters(this ReadOnlySpan<by
120120
}
121121
}
122122

123+
public static string GetAsciiOrUTF8StringNonNullCharacters(this Span<byte> span)
124+
=> GetAsciiOrUTF8StringNonNullCharacters((ReadOnlySpan<byte>)span);
125+
126+
public static string GetAsciiOrUTF8StringNonNullCharacters(this ReadOnlySpan<byte> span)
127+
=> StringUtilities.GetAsciiOrUTF8StringNonNullCharacters(span, HeaderValueEncoding);
128+
123129
private static unsafe void GetAsciiStringNonNullCharacters(Span<char> buffer, IntPtr state)
124130
{
125131
fixed (char* output = &MemoryMarshal.GetReference(buffer))
@@ -133,7 +139,7 @@ private static unsafe void GetAsciiStringNonNullCharacters(Span<char> buffer, In
133139
}
134140
}
135141

136-
public static string GetRequestHeaderStringNonNullCharacters(this Span<byte> span, bool useLatin1) =>
142+
public static string GetRequestHeaderStringNonNullCharacters(this ReadOnlySpan<byte> span, bool useLatin1) =>
137143
useLatin1 ? span.GetLatin1StringNonNullCharacters() : span.GetAsciiOrUTF8StringNonNullCharacters(HeaderValueEncoding);
138144

139145
public static string GetAsciiStringEscaped(this ReadOnlySpan<byte> span, int maxChars)

src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>Core components of ASP.NET Core Kestrel cross-platform web server.</Description>
@@ -20,9 +20,8 @@
2020
<Compile Include="$(SharedSourceRoot)runtime\Http2\**\*.cs" Link="Shared\runtime\Http2\%(Filename)%(Extension)" />
2121
<Compile Include="$(SharedSourceRoot)runtime\Http3\**\*.cs" Link="Shared\runtime\Http3\%(Filename)%(Extension)" />
2222
<Compile Include="$(SharedSourceRoot)Hpack\**\*.cs" Link="Shared\Hpack\%(Filename)%(Extension)" />
23-
<Compile Include="$(SharedSourceRoot)ServerInfrastructure\**\*.cs" LinkBase="Shared\" />
24-
<Compile Include="$(RepoRoot)src\Shared\TaskToApm.cs" Link="Internal\TaskToApm.cs" />
2523
<Compile Include="$(SharedSourceRoot)ServerInfrastructure\**\*.cs" />
24+
<Compile Include="$(RepoRoot)src\Shared\TaskToApm.cs" Link="Internal\TaskToApm.cs" />
2625
</ItemGroup>
2726

2827
<ItemGroup>

src/Shared/Http2cat/Http2Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public unsafe string GetAsciiStringNonNullCharacters(ReadOnlySpan<byte> span)
168168
return asciiString;
169169
}
170170

171-
public unsafe string GetAsciiOrUTF8StringNonNullCharacters(ReadOnlySpan<byte> span)
171+
public unsafe string GetAsciiOrUTF8StringNonNullCharacters(this ReadOnlySpan<byte> span)
172172
{
173173
if (span.IsEmpty)
174174
{

src/Shared/ServerInfrastructure/StringUtilities.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
1616
internal static class StringUtilities
1717
{
1818
private static string GetAsciiOrUTF8StringNonNullCharacters(this Span<byte> span, Encoding defaultEncoding)
19-
=> GetAsciiOrUTF8StringNonNullCharacters((ReadOnlySpan<byte>)span);
19+
=> GetAsciiOrUTF8StringNonNullCharacters((ReadOnlySpan<byte>)span, defaultEncoding);
2020

2121
public static unsafe string GetAsciiOrUTF8StringNonNullCharacters(this ReadOnlySpan<byte> span, Encoding defaultEncoding)
2222
{
@@ -50,11 +50,8 @@ public static unsafe string GetAsciiOrUTF8StringNonNullCharacters(this ReadOnlyS
5050

5151
return resultString;
5252
}
53-
54-
return resultString;
5553
}
5654

57-
5855
private static readonly SpanAction<char, IntPtr> s_getAsciiOrUtf8StringNonNullCharacters = GetAsciiOrUTF8StringNonNullCharacters;
5956

6057
private static unsafe void GetAsciiOrUTF8StringNonNullCharacters(Span<char> buffer, IntPtr state)
@@ -71,7 +68,7 @@ private static unsafe void GetAsciiOrUTF8StringNonNullCharacters(Span<char> buff
7168
}
7269
}
7370

74-
public static unsafe string GetLatin1StringNonNullCharacters(this Span<byte> span)
71+
public static unsafe string GetLatin1StringNonNullCharacters(this ReadOnlySpan<byte> span)
7572
{
7673
if (span.IsEmpty)
7774
{

0 commit comments

Comments
 (0)