Skip to content

Commit aefef28

Browse files
javiercnTanayParikhMackinnonBuck
authored
[Infrastructure] Update SDK version (#42571)
* Update SDK version * Fix kestrel build issues * Update SDK to 7.0.100-preview.7.22355.9 * Update SDK to 7.0.100-preview.7.22357.3 Co-authored-by: Tanay Parikh <TanayParikh@users.noreply.github.com> Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>
1 parent 1039758 commit aefef28

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "7.0.100-preview.7.22327.3"
3+
"version": "7.0.100-preview.7.22357.3"
44
},
55
"tools": {
6-
"dotnet": "7.0.100-preview.7.22327.3",
6+
"dotnet": "7.0.100-preview.7.22357.3",
77
"runtimes": {
88
"dotnet/x86": [
99
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,16 @@ private int ParseMultiSpanHeader(TRequestHandler handler, ref SequenceReader<byt
313313
}
314314

315315
SequencePosition lineEnd;
316-
ReadOnlySpan<byte> headerSpan;
316+
scoped ReadOnlySpan<byte> headerSpan;
317317
if (currentSlice.Slice(reader.Position, lineEndPosition.Value).Length == currentSlice.Length - 1)
318318
{
319319
// No enough data, so CRLF can't currently be there.
320320
// However, we need to check the found char is CR and not LF
321321

322322
// Advance 1 to include CR/LF in lineEnd
323323
lineEnd = currentSlice.GetPosition(1, lineEndPosition.Value);
324-
headerSpan = currentSlice.Slice(reader.Position, lineEnd).ToSpan();
324+
var header = currentSlice.Slice(reader.Position, lineEnd);
325+
headerSpan = header.IsSingleSegment ? header.FirstSpan : header.ToArray();
325326
if (headerSpan[^1] != ByteCR)
326327
{
327328
RejectRequestHeader(headerSpan);

0 commit comments

Comments
 (0)