13 implementations of ContentLength
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
294public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
Http3\Http3ConnectionTests.cs (1)
829public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostTests.cs (1)
1384public long? ContentLength { get; set; }
Microsoft.AspNetCore.Http (1)
HeaderDictionary.cs (1)
119public long? ContentLength
Microsoft.AspNetCore.Owin (1)
DictionaryStringValuesWrapper.cs (1)
43public long? ContentLength
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
118public long? ContentLength
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
174long? IHeaderDictionary.ContentLength
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
118public long? ContentLength
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
174long? IHeaderDictionary.ContentLength
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpHeaders.cs (1)
28public long? ContentLength
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1ConnectionTests.cs (1)
1199public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
118public long? ContentLength
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
174long? IHeaderDictionary.ContentLength
36 writes to ContentLength
HttpStress (1)
Program.cs (1)
495context.Response.Headers.ContentLength = maxContentLength;
InMemory.FunctionalTests (8)
Http2\Http2ConnectionTests.cs (1)
294public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
Http3\Http3ConnectionTests.cs (1)
829public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
RequestTargetProcessingTests.cs (1)
26context.Response.Headers.ContentLength = 11;
ResponseTests.cs (3)
680httpContext.Response.Headers.ContentLength = 1; 718httpContext.Response.Headers.ContentLength = 0; 758httpContext.Response.Headers.ContentLength = 1;
src\Servers\Kestrel\shared\test\TestApp.cs (2)
35response.Headers.ContentLength = bytes.Length; 69response.Headers.ContentLength = bytes.Length;
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
987ctx.Request.Headers.ContentLength = ctx.Request.Path.Value.Length;
Microsoft.AspNetCore.Http (2)
Internal\DefaultHttpRequest.cs (1)
88set { Headers.ContentLength = value; }
Internal\DefaultHttpResponse.cs (1)
90set { Headers.ContentLength = value; }
Microsoft.AspNetCore.Http.Extensions (2)
RequestHeaders.cs (1)
132Headers.ContentLength = value;
ResponseHeaders.cs (1)
72Headers.ContentLength = value;
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheEntry.cs (1)
116headers.ContentLength = Body.Length;
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingMiddleware.cs (1)
349context.CachedResponse.Headers.ContentLength = cachedResponseBody.Length;
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionBody.cs (1)
234headers.ContentLength = default;
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.cs (1)
386RequestHeaders.ContentLength = null;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (8)
Http1\Http1ConnectionTests.cs (1)
1199public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
Http2\Http2HeadersEnumeratorTests.cs (2)
23responseHeaders.ContentLength = 9; 59responseTrailers.ContentLength = 9;
Http3\Http3HeadersEnumeratorTests.cs (2)
23responseHeaders.ContentLength = 9; 59responseTrailers.ContentLength = 9;
HttpRequestHeadersTests.cs (1)
180headers.ContentLength = 0;
src\Servers\Kestrel\shared\test\TestApp.cs (2)
35response.Headers.ContentLength = bytes.Length; 69response.Headers.ContentLength = bytes.Length;
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (6)
Http2\HPackHeaderWriterBenchmark.cs (1)
34knownHeaders.ContentLength = 0;
Http2\Http2FrameWriterBenchmark.cs (1)
61headers.ContentLength = 1024;
Http3\QPackDecoderBenchmark.cs (1)
38((IHeaderDictionary)headers).ContentLength = 0;
ResponseHeadersWritingBenchmark.cs (3)
73responseHeaders.ContentLength = _helloWorldPayload.Length; 117responseHeaders.ContentLength = 421; 152responseHeaders.ContentLength = _helloWorldPayload.Length;
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
114_context.Response.Headers.ContentLength = stream.Length; 131_context.Response.Headers.ContentLength = fileInfo.Length;
Sockets.FunctionalTests (2)
src\Servers\Kestrel\shared\test\TestApp.cs (2)
35response.Headers.ContentLength = bytes.Length; 69response.Headers.ContentLength = bytes.Length;
14 references to ContentLength
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
294public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
Http3\Http3ConnectionTests.cs (1)
829public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }
Microsoft.AspNetCore.Http (2)
Internal\DefaultHttpRequest.cs (1)
87get { return Headers.ContentLength; }
Internal\DefaultHttpResponse.cs (1)
89get { return Headers.ContentLength; }
Microsoft.AspNetCore.Http.Extensions (2)
RequestHeaders.cs (1)
128return Headers.ContentLength;
ResponseHeaders.cs (1)
68return Headers.ContentLength;
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
RequestHeaderTests.cs (1)
163Assert.Null(requestHeaders.ContentLength);
Microsoft.AspNetCore.Server.IIS (3)
Core\IISHttpContext.cs (3)
383if (RequestHeaders.ContentLength.HasValue) 391return RequestHeaders.ContentLength.GetValueOrDefault() > 0; 484if (RequestHeaders.ContentLength > MaxRequestBodySize)
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http2\Http2Connection.cs (1)
1275_currentHeadersStream.InputRemaining = _currentHeadersStream.RequestHeaders.ContentLength;
Internal\Http2\Http2MessageBody.cs (1)
38if (_context.RequestHeaders.ContentLength > maxRequestBodySize)
Internal\Http3\Http3MessageBody.cs (1)
29if (_context.RequestHeaders.ContentLength > maxRequestBodySize)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1ConnectionTests.cs (1)
1199public long? ContentLength { get => _innerHeaders.ContentLength; set => _innerHeaders.ContentLength = value; }