UriParseException when a control character is present.UriParser.rejectControlChars
private
void rejectControlChars(string component, string name) @safeReject 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
component | Component text to check. |
name | Component name for the error message. |