To avoid the problem with the realm I used an URI with the user info included. Next subroutine works perfect:
#----------------------- # Subroutine check_link #----------------------- sub check_link { my $url = $_[0]; my $user = 'Admin'; my $pass = '********'; my $UriInfo = 'http://'.$user.':'.$pass.'@'; $url =~ s/http:\/\//$UriInfo/; my $ua = LWP::UserAgent->new; my $res = $ua->head($url); if ($res->is_error) { return '<FONT COLOR="#FF0000">X</FONT>'; } else { return '<FONT COLOR="#008800">V</FONT>'; } }
Thank you all for the very meaningful contributions.
In reply to Re^3: 400 URL must be absolute
by Wijnand
in thread 400 URL must be absolute
by Wijnand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |