You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jim Brandt <cb...@buffalo.edu> on 2008/07/16 18:06:53 UTC
mod_proxy_html (reverse proxy) functionality for Apache 1
I need to implement the reverse proxy link-fixing behavior provided in
Apache 2 by mod_proxy_html:
http://apache.webthing.com/mod_proxy_html/
but I need it in Apache 1.
Some digging turned up Apache::ReverseProxy, which appears to have a
nice spot in the code to access the response body before sending it back
to the client.
Are there any other solutions for Apache 1 before I start hacking on
this module? I need solutions that run through Apache because I need the
auth provided by an existing Apache module.
Any issues other than dealing with an incorrect Content-length value?
Thanks,
Jim
--
Jim Brandt
Administrative Computing Services
University at Buffalo
Re: mod_proxy_html (reverse proxy) functionality for Apache 1
Posted by Jim Brandt <cb...@buffalo.edu>.
Turns out I was able to munge the pages on the way back using
Apache::ReverseProxy.
I did this by just hacking in my fixes, but I'm thinking this might be a
useful feature to suggest to the author (with a patch, of course).
At first I thought to offer some of the same functionality as
mod_proxy_html (just the URL rewriting part). But I ended up needed to
modify more than just the URLs in the pages coming through. So I thought
why not just accept a subroutine reference and run the data coming back
through whatever code the user provides?
Any comments on that? What would be the best interface to define the
subroutine reference? Any existing modules that accept this sort of
configuration?
Thanks,
Jim
Jim Brandt wrote:
> I need to implement the reverse proxy link-fixing behavior provided in
> Apache 2 by mod_proxy_html:
>
> http://apache.webthing.com/mod_proxy_html/
>
> but I need it in Apache 1.
>
> Some digging turned up Apache::ReverseProxy, which appears to have a
> nice spot in the code to access the response body before sending it back
> to the client.
>
> Are there any other solutions for Apache 1 before I start hacking on
> this module? I need solutions that run through Apache because I need the
> auth provided by an existing Apache module.
>
> Any issues other than dealing with an incorrect Content-length value?
>
> Thanks,
> Jim
>
--
Jim Brandt
Administrative Computing Services
University at Buffalo
Re: mod_proxy_html (reverse proxy) functionality for Apache 1
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, Jul 16, 2008 at 12:06 PM, Jim Brandt <cb...@buffalo.edu> wrote:
> Are there any other solutions for Apache 1 before I start hacking on this
> module?
The Apache::Filter stuff does work, but I don't see any advantage to
using that in this case. You'd still have to do the proxy fetch
yourself.
- Perrin