Returns non-zero if the Referer: header value passed matches the * host of the request. */
| 1112 | /* Returns non-zero if the Referer: header value passed matches the |
| 1113 | * host of the request. */ |
| 1114 | static int safe_referer(request_rec *r, const char *ref) |
| 1115 | { |
| 1116 | apr_uri_t uri; |
| 1117 | |
| 1118 | if (apr_uri_parse(r->pool, ref, &uri) || !uri.hostname) |
| 1119 | return 0; |
| 1120 | |
| 1121 | return strcasecmp(uri.hostname, ap_get_server_name(r)) == 0; |
| 1122 | } |
| 1123 | |
| 1124 | /* |
| 1125 | * Process the paramters and add or update the worker of the |
no test coverage detected