Re: WWW-Authenticate
rschramm@whittman-hart.com
Fri, 23 Apr 1999 09:19:18 -0400
--0__=ZagDva7KuYF2y0quQiFBjvKENf4DQBpJmATmBRIJo4B7z7UaBZ3gH8Wh
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline
You should read the LWP cookbook (lwpcook.pod) that comes with the manual. It
has sample code of doing all kinds of different things with LWP, including
authentication which is easy to use. You can convert that doc to HTML by using
pod2html in your bin directory.
From the cookbook:
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$req = new HTTP::Request GET => 'http://www.sn.no/secret/';
$req->authorization_basic('aas', 'mypassword');
print $ua->request($req)->as_string;
Rich
Evelyn Chew <echew@krdl.org.sg> on 04/22/99 11:03:23 PM
To: libwww-perl@ics.uci.edu
cc: (bcc: Rich Schramm/Whittman-Hart LP)
Subject: WWW-Authenticate
Hi,
I am new to perl. I have just installed the LPW module. I have read somewhere
that if you the server return something like "WWW-Authenticate: Basic
realm="Restricted"" as the header, the browser will response with a name and
password dialog box. Can anyone tell me how it should be done? I am quite loss
now and I find very little documentation on LPW module.
-Maxx
--0__=ZagDva7KuYF2y0quQiFBjvKENf4DQBpJmATmBRIJo4B7z7UaBZ3gH8Wh
Content-type: text/html;
name="att1.htm"
Content-Disposition: attachment; filename="att1.htm"
Content-transfer-encoding: x-uuencode
Content-Description: Internet HTML
begin 644 att1.htm
M/"%$3T-465!%($A434P@4%5"3$E#("(M+R]7,T,O+T141"!7,R!(5$U,+R]%
M3B(^#0H\2%1-3#X-"CQ(14%$/@T*#0H\345402!C;VYT96YT/71E>'0O:'1M
M;#MC:&%R<V5T/6ES;RTX.#4Y+3$@:'1T<"UE<75I=CU#;VYT96YT+51Y<&4^
M#0H\345402!C;VYT96YT/2<B35-(5$U,(#0N-S(N,S8Q,BXQ-S`V(B<@;F%M
M93U'14Y%4D%43U(^#0H\+TA%040^#0H\0D]$62!B9T-O;&]R/2-F9F9F9F8^
M#0H\1$E6/CQ&3TY4(&-O;&]R/2,P,#`P,#`@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