UriParser.rejectControlChars

private void rejectControlChars(string component, string name) @safe

Reject raw control characters (C0 controls and DEL) in a component.

RFC 3986 never permits control characters in any URI component. Accepting them enables CRLF injection when URIs are embedded in text protocols (HTTP requests, headers, log lines), so this check applies in both strict and non-strict modes.

Parameters

componentComponent text to check.
nameComponent name for the error message.

Throws

UriParseException when a control character is present.