return ret;
}
-static int proxy_trans_match(request_rec *r, struct proxy_alias *ent,
- proxy_dir_conf *dconf)
+PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
+ proxy_dir_conf *dconf)
{
int len;
const char *fake;
unsigned int nocanon = ent->flags & PROXYPASS_NOCANON;
const char *use_uri = nocanon ? r->unparsed_uri : r->uri;
- if ((dconf->interpolate_env == 1) && (ent->flags & PROXYPASS_INTERPOLATE)) {
+ if (dconf && (dconf->interpolate_env == 1) && (ent->flags & PROXYPASS_INTERPOLATE)) {
fake = proxy_interpolate(r, ent->fake);
real = proxy_interpolate(r, ent->real);
}
/* short way - this location is reverse proxied? */
if (dconf->alias) {
- int rv = proxy_trans_match(r, dconf->alias, dconf);
+ int rv = ap_proxy_trans_match(r, dconf->alias, dconf);
if (DONE != rv) {
return rv;
}
if (conf->aliases->nelts) {
ent = (struct proxy_alias *) conf->aliases->elts;
for (i = 0; i < conf->aliases->nelts; i++) {
- int rv = proxy_trans_match(r, &ent[i], dconf);
+ int rv = ap_proxy_trans_match(r, &ent[i], dconf);
if (DONE != rv) {
return rv;
}
PROXY_DECLARE(apr_status_t) ap_proxy_update_members(proxy_balancer *b, server_rec *s,
proxy_server_conf *conf);
+
+/**
+ * Find the matched alias for this request and setup for proxy handler
+ * @param r request
+ * @param ent proxy_alias record
+ * @param dconf per-dir config or NULL
+ * @return DECLINED, DONE or OK if matched
+ */
+PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
+ proxy_dir_conf *dconf);
+
#define PROXY_LBMETHOD "proxylbmethod"
/* The number of dynamic workers that can be added when reconfiguring.