HttpWorkerRequest.SendCalculatedContentLength Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a Content-Length
HTTP header to the response.
Overloads
SendCalculatedContentLength(Int32) |
Adds a |
SendCalculatedContentLength(Int64) |
Adds a |
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기