MCPcopy Create free account
hub / github.com/apache/trafficserver / url_is_mostly_compliant

Function url_is_mostly_compliant

src/proxy/hdrs/URL.cc:1205–1219  ·  view source on GitHub ↗

* This method will return TRUE if the uri is mostly compliant with * RFC 3986 and it will return FALSE if not. Specifically denying white * space an unprintable characters */

Source from the content-addressed store, hash-verified

1203 * space an unprintable characters
1204 */
1205bool
1206url_is_mostly_compliant(const char *start, const char *end)
1207{
1208 for (const char *i = start; i < end; ++i) {
1209 if (isspace(*i)) {
1210 Dbg(dbg_ctl_http, "Whitespace character [0x%.2X] found in URL", (unsigned char)*i);
1211 return false;
1212 }
1213 if (!isprint(*i)) {
1214 Dbg(dbg_ctl_http, "Non-printable character [0x%.2X] found in URL", (unsigned char)*i);
1215 return false;
1216 }
1217 }
1218 return true;
1219}
1220
1221} // namespace UrlImpl
1222using namespace UrlImpl;

Callers 2

url_parseFunction · 0.85
test_URL.ccFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected