Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ private static bool EncodeHeaderBlockPrefix(Span<byte> destination, out int byte
return true;
}

// TODO these are fairly hard coded for the first two bytes to be zero.
public bool BeginEncode(IEnumerable<KeyValuePair<string, string>> headers, Span<byte> buffer, out int length)
{
_enumerator = headers.GetEnumerator();
Expand All @@ -351,7 +350,11 @@ public bool BeginEncode(IEnumerable<KeyValuePair<string, string>> headers, Span<
buffer[0] = 0;
buffer[1] = 0;

return Encode(buffer.Slice(2), out length);
bool doneEncode = Encode(buffer.Slice(2), out length);

// Add two for the first two bytes.
length += 2;
return doneEncode;
}

public bool BeginEncode(int statusCode, IEnumerable<KeyValuePair<string, string>> headers, Span<byte> buffer, out int length)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

Expand Down Expand Up @@ -143,12 +143,6 @@ static MsQuicApi()

OperatingSystem ver = Environment.OSVersion;

if (ver.Platform == PlatformID.Win32NT && ver.Version < new Version(10, 0, 19041, 0))
{
IsQuicSupported = false;
return;
}

// TODO: try to initialize TLS 1.3 in SslStream.

try
Expand Down