TSocketServerLimits Class
Protection limits enforced by the socket server while parsing incoming HTTP requests.
Remarks
All sizes are in bytes. Requests exceeding any of the limits are rejected with an error status code and their connections are closed.
Syntax
Unit: Sparkle.Socket.HttpParser
TSocketServerLimits = class(TObject);
Constants
| Name | Description |
|---|---|
| DefaultMaxHeaderCount | Default value of the MaxHeaderCount property. |
| DefaultMaxHeaderLineLength | Default value of the MaxHeaderLineLength property. |
| DefaultMaxHeadersLength | Default value of the MaxHeadersLength property. |
| DefaultMaxRequestLineLength | Default value of the MaxRequestLineLength property. |
Constructors
| Name | Description |
|---|---|
| Create | Creates a new instance with all limits set to their default values. |
Methods
| Name | Description |
|---|---|
| Assign | Copies all limit values from another instance. |
Properties
| Name | Description |
|---|---|
| MaxBodySize | Gets or sets the maximum size, in bytes, of the request body. 0 (the default) means no body size limit. |
| MaxHeaderCount | Gets or sets the maximum number of headers accepted in a request. Defaults to 100. |
| MaxHeaderLineLength | Gets or sets the maximum length, in bytes, of a single header line. Defaults to 8192. |
| MaxHeadersLength | Gets or sets the maximum total length, in bytes, of all header lines of a request. Defaults to 65536. |
| MaxRequestLineLength | Gets or sets the maximum length, in bytes, of the request line (method, target and protocol version). Defaults to 8192. |