* 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 */
| 1203 | * space an unprintable characters |
| 1204 | */ |
| 1205 | bool |
| 1206 | url_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 |
| 1222 | using namespace UrlImpl; |
no outgoing calls
no test coverage detected