HttpWorkerRequest.SendCalculatedContentLength Method

Definition

Adds a Content-Length HTTP header to the response.

Overloads

SendCalculatedContentLength(Int32)

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

SendCalculatedContentLength(Int64)

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

SendCalculatedContentLength(Int32)

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

public:
 virtual void SendCalculatedContentLength(int contentLength);
public virtual void SendCalculatedContentLength (int contentLength);
abstract member SendCalculatedContentLength : int -> unit
override this.SendCalculatedContentLength : int -> unit
Public Overridable Sub SendCalculatedContentLength (contentLength As Integer)

Parameters

contentLength
Int32

The length of the response, in bytes.

Remarks

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.

See also

Applies to

SendCalculatedContentLength(Int64)

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

public:
 virtual void SendCalculatedContentLength(long contentLength);
public virtual void SendCalculatedContentLength (long contentLength);
abstract member SendCalculatedContentLength : int64 -> unit
override this.SendCalculatedContentLength : int64 -> unit
Public Overridable Sub SendCalculatedContentLength (contentLength As Long)

Parameters

contentLength
Int64

The length of the response, in bytes.

Remarks

When the content length is not explicitly set, this method enables the HttpWorkerRequest instance to add a Content-Length HTTP header to the response. The default implementation calls the overload that takes a contentLength parameter of type Int32.

Use this overload to specify the response for message bodies greater than 2 GB.

See also

Applies to