3 writes to Limits
InMemory.FunctionalTests (1)
MaxRequestLineSizeTests.cs (1)
90Limits =
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
KestrelServerTests.cs (2)
223Limits = 249Limits =
66 references to Limits
Binding.Http.IntegrationTests (1)
MtomBindingTestHelper.cs (1)
47serverOptions.Limits.MaxRequestBodySize = 5_368_709_120;
InMemory.FunctionalTests (2)
RequestHeaderLimitsTests.cs (2)
167options.Limits.MaxRequestHeaderCount = maxRequestHeaderCount.Value; 172options.Limits.MaxRequestHeadersTotalSize = maxRequestHeadersTotalSize.Value;
Interop.FunctionalTests (5)
Http3\Http3RequestTests.cs (1)
2020kestrel.Limits.MinRequestBodyDataRate = null;
HttpClientHttp2InteropTests.cs (4)
1139options.Limits.Http2.HeaderTableSize = 1; 1199options.Limits.Http2.MaxStreamsPerConnection = 5; 1260options.Limits.Http2.MaxStreamsPerConnection = 5; 1318webHostBuilder.ConfigureKestrel(options => options.Limits.Http2.MaxFrameSize = 1024 * 20); // The default is 16kb
InteropWebsite (1)
Program.cs (1)
50options.Limits.MinRequestBodyDataRate = null;
Microsoft.AspNetCore.Server.Kestrel.Core (46)
Internal\Http\Http1Connection.cs (7)
93TimeoutControl.StartDrainTimeout(MinResponseDataRate, ServerOptions.Limits.MaxResponseBufferSize); 185TimeoutControl.ResetTimeout(ServerOptions.Limits.RequestHeadersTimeout, TimeoutReason.RequestHeaders); 216if (reader.Remaining >= ServerOptions.Limits.MaxRequestLineSize) 226var trimmedBuffer = reader.Sequence.Slice(reader.Position, ServerOptions.Limits.MaxRequestLineSize); 680_remainingRequestHeadersBytesAllowed = (long)ServerOptions.Limits.MaxRequestHeadersTotalSize + 2; 682MinResponseDataRate = ServerOptions.Limits.MinResponseDataRate; 705TimeoutControl.SetTimeout(ServerOptions.Limits.KeepAliveTimeout, TimeoutReason.KeepAlive);
Internal\Http\HttpProtocol.cs (3)
357MaxRequestBodySize = ServerOptions.Limits.MaxRequestBodySize; 358MinRequestBodyDataRate = ServerOptions.Limits.MinRequestBodyDataRate; 430_eagerRequestHeadersParsedLimit = ServerOptions.Limits.MaxRequestHeaderCount;
Internal\Http2\Http2Connection.cs (4)
154var httpLimits = context.ServiceContext.ServerOptions.Limits; 215public KestrelServerLimits Limits => _context.ServiceContext.ServerOptions.Limits; 310var connectionWindow = _context.ServiceContext.ServerOptions.Limits.Http2.InitialConnectionWindowSize; 1581if (_totalParsedHeaderSize > _context.ServiceContext.ServerOptions.Limits.MaxRequestHeadersTotalSize * 2)
Internal\Http2\Http2Stream.cs (4)
60_eagerRequestHeadersParsedLimit = ServerOptions.Limits.MaxRequestHeaderCount * 2; 221if (TotalParsedHeaderSize > ServerOptions.Limits.MaxRequestHeadersTotalSize) 227if (RequestHeadersParsed > ServerOptions.Limits.MaxRequestHeaderCount) 334if (requestLineLength > ServerOptions.Limits.MaxRequestLineSize)
Internal\Http3\Http3Connection.cs (4)
62var httpLimits = context.ServiceContext.ServerOptions.Limits; 96public KestrelServerLimits Limits => _context.ServiceContext.ServerOptions.Limits; 259var requestHeadersTimeout = serviceContext.ServerOptions.Limits.RequestHeadersTimeout.ToTicks( 307var minDataRate = _context.ServiceContext.ServerOptions.Limits.MinResponseDataRate;
Internal\Http3\Http3ControlStream.cs (1)
44var httpLimits = context.ServiceContext.ServerOptions.Limits;
Internal\Http3\Http3Stream.cs (8)
74public KestrelServerLimits Limits => _context.ServiceContext.ServerOptions.Limits; 102_eagerRequestHeadersParsedLimit = ServerOptions.Limits.MaxRequestHeaderCount * 2; 112context.ServiceContext.ServerOptions.Limits.MinResponseDataRate, 126QPackDecoder = new QPackDecoder(_context.ServiceContext.ServerOptions.Limits.Http3.MaxRequestHeaderFieldSize); 289if (_totalParsedHeaderSize > ServerOptions.Limits.MaxRequestHeadersTotalSize * 2) 966if (_totalParsedHeaderSize > ServerOptions.Limits.MaxRequestHeadersTotalSize) 972if (RequestHeadersParsed > ServerOptions.Limits.MaxRequestHeaderCount) 1055if (requestLineLength > ServerOptions.Limits.MaxRequestLineSize)
Internal\KestrelServerImpl.cs (13)
84serverOptions.Limits.MaxConcurrentUpgradedConnections); 197connectionDelegate = EnforceConnectionLimit(connectionDelegate, Options.Limits.MaxConcurrentConnections, Trace, ServiceContext.Metrics); 216multiplexedConnectionDelegate = EnforceConnectionLimit(multiplexedConnectionDelegate, Options.Limits.MaxConcurrentConnections, Trace, ServiceContext.Metrics); 413if (Options.Limits.MaxRequestBufferSize.HasValue && 414Options.Limits.MaxRequestBufferSize < Options.Limits.MaxRequestLineSize) 417CoreStrings.FormatMaxRequestBufferSmallerThanRequestLineBuffer(Options.Limits.MaxRequestBufferSize.Value, Options.Limits.MaxRequestLineSize)); 420if (Options.Limits.MaxRequestBufferSize.HasValue && 421Options.Limits.MaxRequestBufferSize < Options.Limits.MaxRequestHeadersTotalSize) 424CoreStrings.FormatMaxRequestBufferSmallerThanRequestHeaderBuffer(Options.Limits.MaxRequestBufferSize.Value, Options.Limits.MaxRequestHeadersTotalSize));
KestrelServerOptions.cs (2)
354writer.WritePropertyName(nameof(Limits)); 356Limits.Serialize(writer);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Http1\Http1ConnectionTests.cs (2)
269options.Limits.MaxRequestHeadersTotalSize = headerLine1.Length; 270options.Limits.MaxRequestHeaderCount = 1;
Sockets.FunctionalTests (9)
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (7)
325options.Limits.MaxRequestBufferSize = maxRequestBufferSize; 328maxRequestBufferSize.Value < options.Limits.MaxRequestLineSize) 330options.Limits.MaxRequestLineSize = (int)maxRequestBufferSize; 334maxRequestBufferSize.Value < options.Limits.MaxRequestHeadersTotalSize) 336options.Limits.MaxRequestHeadersTotalSize = (int)maxRequestBufferSize; 339options.Limits.MinRequestBodyDataRate = null; 341options.Limits.MaxRequestBodySize = _dataLength;
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (2)
80options.Limits.MaxRequestBodySize = contentLength; 81options.Limits.MinRequestBodyDataRate = null;