SyndicationClient.MaxResponseBufferSize Property

Definition

Gets or sets the maximum number of bytes to buffer when receiving a response from a server.

public:
 property unsigned int MaxResponseBufferSize { unsigned int get(); void set(unsigned int value); };
uint32_t MaxResponseBufferSize();

void MaxResponseBufferSize(uint32_t value);
public uint MaxResponseBufferSize { get; set; }
var uInt32 = syndicationClient.maxResponseBufferSize;
syndicationClient.maxResponseBufferSize = uInt32;
Public Property MaxResponseBufferSize As UInteger

Property Value

UInt32

unsigned int

uint32_t

Maximum size and default is UInt32.MaxValue.

Implements

Remarks

Applications can protect themselves against a malicious server which sends an excessively large response body to DoS the client by setting the property to a smaller number.

If the response from the server contains a Content-Length header with a value greater than the value of this property, the request will be aborted immediately and the operation will immediately fail with an error indicating that the response body was too large. If no Content-Length header is present in the response, the response body will be buffered up to the point of this value. As soon as the response body grows to be larger than this value, the request will be aborted, the buffered response data will be released, and the operation will immediately fail with an error indicating that the response body was too large.

Applies to