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
6 changes: 6 additions & 0 deletions src/Servers/Kestrel/Core/src/CoreStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -641,4 +641,10 @@ For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?l
<data name="FailedToOpenCertStore" xml:space="preserve">
<value>Failed to open certificate store {StoreName}.</value>
</data>
<data name="Http3ConnectionFaulted" xml:space="preserve">
<value>The HTTP/3 connection faulted.</value>
</data>
<data name="Http3StreamAborted" xml:space="preserve">
<value>The HTTP/3 request stream was aborted.</value>
</data>
</root>
9 changes: 5 additions & 4 deletions src/Servers/Kestrel/Core/src/Http3Limits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core
/// </summary>
public class Http3Limits
{
private int _headerTableSize = 4096;
private int _headerTableSize = 0;
private int _maxRequestHeaderFieldSize = 8192;

/// <summary>
/// Limits the size of the header compression table, in octets, the HPACK decoder on the server can use.
/// Limits the size of the header compression table, in octets, the QPACK decoder on the server can use.
/// <para>
/// Value must be greater than 0, defaults to 4096
/// Value must be greater than 0, defaults to 0.
/// </para>
/// </summary>
public int HeaderTableSize
// TODO: Make public https://github.com/dotnet/aspnetcore/issues/26666
internal int HeaderTableSize
{
get => _headerTableSize;
set
Expand Down
38 changes: 0 additions & 38 deletions src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1558,44 +1558,6 @@ private async Task ReadInputAsync()
}
}

private class StreamCloseAwaitable : ICriticalNotifyCompletion
{
private static readonly Action _callbackCompleted = () => { };

// Initialize to completed so UpdateCompletedStreams runs at least once during connection teardown
// if there are still active streams.
private Action? _callback = _callbackCompleted;

public StreamCloseAwaitable GetAwaiter() => this;
public bool IsCompleted => ReferenceEquals(_callback, _callbackCompleted);

public void GetResult()
{
Debug.Assert(ReferenceEquals(_callback, _callbackCompleted));

_callback = null;
}

public void OnCompleted(Action continuation)
{
if (ReferenceEquals(_callback, _callbackCompleted) ||
ReferenceEquals(Interlocked.CompareExchange(ref _callback, continuation, null), _callbackCompleted))
{
Task.Run(continuation);
}
}

public void UnsafeOnCompleted(Action continuation)
{
OnCompleted(continuation);
}

public void Complete()
{
Interlocked.Exchange(ref _callback, _callbackCompleted)?.Invoke();
}
}

private enum RequestHeaderParsingState
{
Ready,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ public ValueTask<FlushResult> WriteRstStreamAsync(int streamId, Http2ErrorCode e
| Value (32) |
+---------------------------------------------------------------+
*/
public ValueTask<FlushResult> WriteSettingsAsync(IList<Http2PeerSetting> settings)
public ValueTask<FlushResult> WriteSettingsAsync(List<Http2PeerSetting> settings)
{
lock (_writeLock)
{
Expand All @@ -569,7 +569,7 @@ public ValueTask<FlushResult> WriteSettingsAsync(IList<Http2PeerSetting> setting
}
}

internal static void WriteSettings(IList<Http2PeerSetting> settings, Span<byte> destination)
internal static void WriteSettings(List<Http2PeerSetting> settings, Span<byte> destination)
{
foreach (var setting in settings)
{
Expand Down
Loading