发布:3.1.15

This commit is contained in:
若汝棋茗
2025-08-03 19:30:36 +08:00
parent 614443381b
commit abfb21f3a8
2 changed files with 5 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<BaseVersion>3.1.14</BaseVersion>
<BaseVersion>3.1.15</BaseVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TouchSocketVersion>$(BaseVersion)</TouchSocketVersion>

View File

@@ -130,11 +130,12 @@ public abstract class HttpBase : IRequestInfo
internal bool ParsingHeader<TByteBlock>(ref TByteBlock byteBlock) where TByteBlock : IByteBlock
{
var index = byteBlock.Span.Slice(byteBlock.Position).IndexOf(StringExtension.Default_RNRN_Utf8Span);
var unreadSpan = byteBlock.Span.Slice(byteBlock.Position);
var index = unreadSpan.IndexOf(StringExtension.Default_RNRN_Utf8Span);
if (index > 0)
{
var headerLength = index - byteBlock.Position + 2;
this.ReadHeaders(byteBlock.Span.Slice(byteBlock.Position, headerLength));
var headerLength = index + 2;
this.ReadHeaders(unreadSpan.Slice(0, headerLength));
byteBlock.Position += headerLength;
byteBlock.Position += 2;
return true;