Well, yes and no.  You can always execute subrequests that are handled by
mod_proxy, and perhaps write your own filters that clobber/rearrange the
data for those subrequests, but that's somewhat of a hack.  Even more of a
hack would be to alter r->connection->client->fd to be some other fd and
then execute a mod_proxy handled subrequest. This works in 1.3.X, I mean,
I've never tried it, well, maybe once, but I didn't like it.

I think what you're really pointing at is http client functionality that
could be used in apache apart from the normal cycle of requests and
subrequests in mod_proxy.  I don't believe this exists, but it would be very
useful.  However, note that the proxy code might be a little overkill due to
the fact that it forwards all of the requesting client's headers.  It might
be better just to have some functionality like that in libghttpd that could
be used when you wanted to use http requests to get data for your handler.

If I'm totally off and what you are really thinking of is a way for a
handler to decide that it cannot satisfy the request and conditionally hand
the request over to mod_proxy, this is possible but tricky.  mod_rewrite
does this, and it involves something like tacking "proxy:" onto the request
uri and setting the content handler to mod_proxy's handler.  You might need
an internal redirect somewhere in there if you tried to do this after fixup
though.

cheers

-bmd

On Mon, Apr 23, 2001 at 02:50:20PM -0700, Ian Holsman wrote:
> Hi guys,
> 
> just a random thought to pollute your minds:
> 
> is it possible to call the reverse proxy code
> directly from another module?
> 
> There are two reasons why this might be a good idea.
> * another module needs to call a webserver to get some info, 
>   which it needs in order for it to continue (grabbing the 
>   region where a IP# falls, doing a dynamic search for a price
>   to add to a log line)
> * a fallback if filters can't get speedy enough, (ie make 
>   a version of mod_include which is not a filter)
> 
> ..Ian
> 
> --
> Ian Holsman
> Performance Measurement & Analysis
> 415-364-8608 

Reply via email to