System.Net.HttpWebRequest.MaximumResponseHeadersLength Property

Gets or sets the maximum allowed length of the response headers.

Syntax

[System.MonoTODO("Use this")]
public int MaximumResponseHeadersLength { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The length of the response header includes the response status line and any extra control characters that are received as part of HTTP protocol. A value of -1 means no limit is imposed on the response headers; a value of 0 means that all requests fail.

If the HttpWebRequest.MaximumResponseHeadersLength property is not explicitly set, it defaults to the value of the HttpWebRequest.DefaultMaximumResponseHeadersLength property.

If the length of the response header received exceeds the value of the HttpWebRequest.MaximumResponseHeadersLength property, the HttpWebRequest.EndGetResponse(IAsyncResult) or HttpWebRequest.GetResponse methods will throw a System.Net.WebException with the WebException.Status property set to WebExceptionStatus.MessageLengthLimitExceeded.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0