}
}
else if (r->proxyreq == PROXYREQ_REVERSE) {
- char *ptr;
- const char *ptr2;
if (conf->reverse) {
+ char *ptr;
+ char *ptr2;
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
"*: found reverse proxy worker for %s", *url);
*balancer = NULL;
* In the case of the generic reverse proxy, we need to see if we
* were passed a UDS url (eg: from mod_proxy) and adjust uds_path
* as required.
+ *
+ * NOTE: Here we use a quick note lookup, but we could also
+ * check to see if r->filename starts with 'proxy:'
*/
if (apr_table_get(r->notes, "rewrite-proxy") &&
- (ptr2 = ap_strstr_c(r->filename, "unix:")) &&
- (ptr = ap_strchr(r->filename, '|'))) {
+ (ptr2 = ap_strcasestr(r->filename, "unix:")) &&
+ (ptr = ap_strchr(ptr2, '|'))) {
apr_uri_t urisock;
apr_status_t rv;
*ptr = '\0';
"worker uds path (%s) too long", sockpath);
}
r->filename = ptr+1; /* so we get the scheme for the uds */
+ *url = apr_pstrdup(r->pool, r->filename);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+ "*: rewrite of url due to UDS: %s", *url);
}
else {
*ptr = '|';