[Memphis.pm] redirecting a localhost web server through cgi
Steve Lane
sml at zfx.com
Tue Jun 26 13:04:17 CDT 2001
Alaric Ravenhall wrote:
>
> No I don't have a firewall in front of the web server.
> I cannot view my webserver from my work because my work's firewall filters
> out non-standard ports.
> I f I have cgi script that pulls pages from a server on the same machine as
> the CGI, then return it to the browser that requested the page from the CGI,
> I know that will work.
use LWP::UserAgent and CGI. read the request with CGI,
then turn it into something that LWP::UserAgent can use
-- CGI probably has a method for doing that without
having to reconstruct the request "by hand". make
the request with LWP::UserAgent. check the response
status, and return/print the response content.
there may be a module that lets you do all this in a
one- or two-liner, maybe LWP::UA::Proxy. search CPAN
for HTTP and Proxy.
if you've got mod_perl, it's probably trivial... get
Apache->request->as_string, change the port, and give
that to LWP::UserAgent.
i'd like to see a solution if you get one.
--
Steve Lane <sml at zfx.com>
----------------------------------------------------------------------------
To unsubscribe, please send email to majordomo at pm.org
with 'unsubscribe memphis-pm-list' in the body of the message.
----------------------------------------------------------------------------
More information about the Memphis-pm
mailing list