Extract new host after redirect through proxy?

tony@default.stanford.edu
Wed, 1 Dec 1999 17:12:01 -0800 (PST)


Hey all,

I've been running a script that uses https to access a server. The
server sometimes redirects me to a different server. When it does
this, I've been able to extract the new server from the SSL header
information.
I've moved everythign recently and I'm no behind a firewall on an
NT system instead of out in the open on a linux system. When I perform
the same request as before, I no longer get the SSL header info in
my response so I cannot extract the server name after redirects.
Everything is talking nicely and the https works but the headers 
are gone.

After the redirect I have to log back into the system and so I've
created a little code like so, with $ua previously defined and $host
extracted from the header info:

my $path = "https://".$host."/scripts/login.dll";
my $username = "UserID=myusername";
my $passwd = "Password=mypassword":
my $request = new HTTP::Request("POST",$path);
$request->content("$username&$passwd");
$response = $ua->request($request):

If there is a cleaner way to handle this sort of thing or if someone
can tell me how to extract the $host after the redirect, I'd appreciate
it.

Thanks from a newbie,

Tony