http://qs321.pair.com?node_id=1190528


in reply to lwp authorization

$req->header('Authorization' => "Basic" .encode_base64('cv23gwyzqvur:ty7idfphrkl'));

I would suggest that you don't try to set your own headers, have a look at the LWP::UserAgent docs for the credentials method instead, e.g.:

$ua->credentials("www.example.com:80", "Some Realm", "foo", "secret");

Note that if you wanted to debug this, one way would be to use Wireshark to capture both a successful authentication via the browser and a failed one from your script.