* Check for an absoluteURI syntax (see section 3.2 in RFC2068). */
| 2375 | * Check for an absoluteURI syntax (see section 3.2 in RFC2068). |
| 2376 | */ |
| 2377 | AP_DECLARE(int) ap_is_url(const char *u) |
| 2378 | { |
| 2379 | int x; |
| 2380 | |
| 2381 | for (x = 0; u[x] != ':'; x++) { |
| 2382 | if ((!u[x]) || |
| 2383 | ((!apr_isalnum(u[x])) && |
| 2384 | (u[x] != '+') && (u[x] != '-') && (u[x] != '.'))) { |
| 2385 | return 0; |
| 2386 | } |
| 2387 | } |
| 2388 | |
| 2389 | return (x ? 1 : 0); /* If the first character is ':', it's broken, too */ |
| 2390 | } |
| 2391 | |
| 2392 | AP_DECLARE(int) ap_ind(const char *s, char c) |
| 2393 | { |
no outgoing calls
no test coverage detected