HttpWorkerRequest.SendCalculatedContentLength Method (Int32)

 

Adds a Content-Length HTTP header to the response for message bodies that are less than or equal to 2 GB.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public virtual void SendCalculatedContentLength(
	int contentLength
)

Parameters

contentLength
Type: System.Int32

The length of the response, in bytes.

When the content length is not explicitly set, this method enables the HttpWorkerRequest instance to add a Content-Length HTTP header to the response.

Use this overload to set the Content-Length header when the length of the response message body is less than or equal to 2 GB.

.NET Framework
Available since 1.1
Return to top
Show: