LWP problems

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm trying to touch IBM from inside a proxy. My LWP code touches the proxy,
but does not authenticate with the proxy so I can go on to IBM. Does anyone
see my mistake?



Here is the code:


# $Id$
# $Log$

# grab the machine type from 'lsattr -El sys0'
# grab the current microcode version depending on the command for that machine
# grab the latest microcode version for this box from:
#    http://techsupport.services.ibm.com/server/mdownload/download.html
# complain if the microcode is not at the current version

use LWP::UserAgent;
use LWP::Debug qw(+);
use strict;

# globals
my $microcodeurl =
'http://techsupport.services.ibm.com/server/mdownload/download.html ';

# get the machine type
my $cmd = 'lsattr -El sys0 | grep modelname';
open(IN, "$cmd |") or die "$0: cannot execute '$cmd': $!";
my $line = <IN>;

# pull the microcode version from IBM
# and the command to get the currently installed microcode version
my $ua = LWP::UserAgent->new();
$ua->proxy('http', 'http://txisa002.ttiinc.com:8080 ');
my $req = HTTP::Request->new(GET => $microcodeurl);
my $user = 'domain\user';
my $pass = 'password';
$req->proxy_authorization_basic($user, $pass);
my $page = $ua->request($req)->as_string;

Site Timeline