In <[EMAIL PROTECTED]> on 09 May 2004,
   hubert depesz lubaczewski <[EMAIL PROTECTED]> wrote:
> i need to be able to fetch a webpage with given address (let's say:
> http://www.depesz.pl/personal.php) but - send the request to another
> server.
> i.e.
> www.depesz.pl happens to be 217.17.46.135
> and i want this request to be sent to 10.2.1.7.

If 10.2.1.7 complies even even minimally with HTTP/1.1, then you
can force requests to be sent to it by setting 10.2.1.7 to be your
proxy server.  If limiting yourself to LWP::Simple, then the proxy
server is set through environment variables (e.g., set http_proxy
to http://10.2.1.7/).  See the LWP::UserAgent man page for more
details.

Note: Pretending 10.2.1.7 is a proxy will result in 10.2.1.7 getting
an absolute URI in the request line, whereas www.depesz.pl would have
received an absolute path instead.  HTTP/1.1 servers are required to
accept either form, so this difference should normally not matter.

-ccwf
-- 
Charles C. Fu                           ,--
Founder                ___  __ __. . ,-/--
Web i18n, LLC              (_,(_,|/|/ /
www.web-i18n.net                 ----'

Reply via email to