extract hostname from HTTP::Request
=?iso-8859-1?Q?Jonas_Nordstr=F6m?= (Jonas.Nordstrom@ei.sigma.se)
Wed, 17 Mar 1999 09:43:25 +0100
I have a modperl-script in which I want to change hostname for a request.
If the original URL is for example http://myhost/test/xxx.html, then I want
to change that to http://test/xxx.html and then use LWP::UserAgent to make a
request to the new host. I then use HTML::Parse to print the page. As I
print the page, I want to modify all links to the "test" host to
"myhost/test". Where along the line can I extract the original hostname? Can
I use a subroutine in HTTP::xxx or do I have to filter out the host myself?
regards,
Jonas Nordstrom