B
Bob Mariotti
First, I have lwpcook, Perl & LWP, Web Client Programming, Perl in a
Nutshell and Network Programming with Perl ALL in front of me. And, I
have read and reread the sections on LWP. I've also scoured usenet
with google groups but I am still confused because none of these
sources (including perldoc.org) actually explain.
I have a program that must send authentication as a basic header.
This is being accomplished with the following instructions:
$REQ= POST $URL2;
$REQ->authorization_basic("$USERID","$PASSWD");
At this level the content of the USERID and PASSWD are plain text. It
appears that when the $RSP=$UA->request($REQ); is executed, the
modules must be base64_encoding the values because when I dump the
request itself I can see the encoded string.
However, it seems that the encoded string is encoded TWICE.
If I take the encoded string from the logged request and pass it
through a decoder it return the phrase:
BASIC -another_encoded_string-
If I then take the -another_encoded_string- and pass it through the
decoder by itself it returns my plain text USERID and PASSWD string.
Go figure!
Am I understanding this correctly? Because this is not what one is
led to believe when reading all the reference docs.
I just want to understand so we can forever more use it correctly.
Please comment advise?
Thanks,
Nutshell and Network Programming with Perl ALL in front of me. And, I
have read and reread the sections on LWP. I've also scoured usenet
with google groups but I am still confused because none of these
sources (including perldoc.org) actually explain.
I have a program that must send authentication as a basic header.
This is being accomplished with the following instructions:
$REQ= POST $URL2;
$REQ->authorization_basic("$USERID","$PASSWD");
At this level the content of the USERID and PASSWD are plain text. It
appears that when the $RSP=$UA->request($REQ); is executed, the
modules must be base64_encoding the values because when I dump the
request itself I can see the encoded string.
However, it seems that the encoded string is encoded TWICE.
If I take the encoded string from the logged request and pass it
through a decoder it return the phrase:
BASIC -another_encoded_string-
If I then take the -another_encoded_string- and pass it through the
decoder by itself it returns my plain text USERID and PASSWD string.
Go figure!
Am I understanding this correctly? Because this is not what one is
led to believe when reading all the reference docs.
I just want to understand so we can forever more use it correctly.
Please comment advise?
Thanks,