ParserLimits

Namespace: Glyph11.Parser

public readonly record struct ParserLimits

A record struct defining configurable resource limits for the parser. Use with expressions to customize.

Properties

PropertyTypeDefaultDescription
MaxHeaderCountint100Maximum number of headers per request
MaxHeaderNameLengthint256Maximum bytes for a single header name
MaxHeaderValueLengthint8192Maximum bytes for a single header value
MaxUrlLengthint8192Maximum bytes for the request URL
MaxQueryParameterCountint128Maximum number of query parameters
MaxMethodLengthint16Maximum bytes for the HTTP method
MaxTotalHeaderBytesint32768Maximum total bytes for the header section

Static Properties

PropertyTypeDescription
DefaultParserLimitsReturns a ParserLimits with all default values

Declaration

namespace Glyph11.Parser;

public readonly record struct ParserLimits
{
    public int MaxHeaderCount           { get; init; }
    public int MaxHeaderNameLength      { get; init; }
    public int MaxHeaderValueLength     { get; init; }
    public int MaxUrlLength             { get; init; }
    public int MaxQueryParameterCount   { get; init; }
    public int MaxMethodLength          { get; init; }
    public int MaxTotalHeaderBytes      { get; init; }

    public static ParserLimits Default { get; }
}