httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <>
Subject Re: cvs commit: apache/src mod_negotiation.c
Date Mon, 29 Jul 1996 02:39:14 GMT
Alexei Kosut liltingly intones:
> On Sun, 28 Jul 1996, Chuck Murcko wrote:
> > OK, then. Want to leave it as it is? Or check for both, and set r->proxyreq
> > on aliases, too? I was unaware of the timeline on this.
> mod_negotiation should check only r->proxyreq, and ProxyPass should set
> it. What do you mean by "aliases"?
When a proxy request is translated in proxy_trans(), and r->proxyreq is not
set, then the proxy_alias list of ProxyPass (a virtual path and a URL)
entries is checked. If the request matches one of these, proxy: is
prepended to the URL in the ProxyPass entry. These are the aliases
I'm referring to.

It's trivial to set r->proxyreq here, but it's not being done, since
!r->proxyreq is used to enter this part of the translation.

Here's the function:

static int 
proxy_trans(request_rec *r)
    void *sconf = r->server->module_config; 
    proxy_server_conf *conf =
        (proxy_server_conf *)get_module_config(sconf, &proxy_module);
    if (r->proxyreq)
        if (!conf->req) return DECLINED;
        r->filename = pstrcat(r->pool, "proxy:", r->uri, NULL);
        r->handler = "proxy-server";
        return OK;
    } else
        int i, len;
        struct proxy_alias *ent=(struct proxy_alias *)conf->aliases->elts;
        for (i=0; i < conf->aliases->nelts; i++)
            len = alias_match(r->uri, ent[i].fake); 
            if (len > 0)
                r->filename = pstrcat(r->pool, "proxy:", ent[i].real,
                                      r->uri + len, NULL);
                r->handler = "proxy-server";
                return OK;      
        return DECLINED;

Chuck Murcko	N2K Inc.	Wayne PA
And now, on a lighter note:
The moon is a planet just like the Earth, only it is even deader.

View raw message