Click or drag to resize

DavEngineCalculateContentLength Property

IT Hit WebDAV Classes Reference
Indicates if response content length calculation will occur.

Namespace: ITHit.WebDAV.Server
Assembly: ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 4.5.3121.0
Syntax
public bool CalculateContentLength { get; set; }

Property Value

Type: Boolean
Boolean value indicating if content length will be calculated in Run(DavContextBase) method. Default is true.
Remarks

If this property is set to true engine will calculate output content length and set ContentLength property before returning from Run(DavContextBase) method. If you would like to send chunked responses you must set this property to false.

ASP.NET will send chunked responses only to GET verb if HttpContext.Current.Response.BufferOutput = false and request is HTTP 1.1. Responses to all other verbs will not be chunked.

To send chunked responses from HttpListener you must set this property to false and set HttpListenerContext.Response.SendChunked = true. If SendChunked=false and CalculateContentLength=false than HttpListener will not send any response because the content length will be unknown.

Responses must not include both Content-Length header and Transfer-Encoding: chunked header. If server is sending chunked response client application will not be able to detect content length. Downloading a large file using download manager client will not be able to see the entire content length and evaluate time required for download.

See Also