URI Parser Configuration #
This module defines URI.Config, which controls per-component size limits used during URI
parsing. All limits default to the values previously hardcoded in the parser, except
maxQueryLength, which is raised from 1024 to 8192 to match H1.Config.maxUriLength and
accommodate real-world query strings.
Per-component size limits for the URI parser.
- maxSchemeLength : Nat
Maximum length of the URI scheme component (e.g.
https), in bytes. The scheme grammar requires at least one leading ALPHA; the remaining budget ismax(0, maxSchemeLength - 1)additional characters. - maxHostLength : Nat
Maximum length of the host
reg-namecomponent, in bytes. - maxUserInfoLength : Nat
Maximum length of the userinfo component (username and password each), in bytes.
- maxSegmentLength : Nat
Maximum length of a single path segment, in bytes.
- maxQueryLength : Nat
Maximum length of the query string, in bytes. Raised from the previously hardcoded 1024 to 8192 to match
H1.Config.maxUriLengthand allow real-world query strings. - maxFragmentLength : Nat
Maximum length of the fragment component, in bytes.
- maxPathSegments : Nat
Maximum number of path segments. Prevents excessive segment counts that could arise from paths like
/a/b/c/…repeated many times. - maxTotalPathLength : Nat
Maximum total byte length of the path (all segments combined, including separating slashes).
- maxQueryParams : Nat
Maximum number of query parameters (key-value pairs separated by
&).