printing the redirections responses

"Octavian Rasnita" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <000501c58dbc$20c0ee10$251c320a@teddy>
Hi,

I have tried:

use LWP::UserAgent;

my $url = "https://www.server.com/";

my $ua = LWP::UserAgent->new(env_proxy => 0,
timeout => 200,
keep_alive => 1,
);

my $request = HTTP::Request->new('GET', $url);

my $response = $ua->request($request);

print $response->as_string();

---

The response is the final page, even though there is a redirection until
this page is returned. Is it possible to get and print that redirect HTTP
header?

Thank you.

Teddy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.