Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: HTTPChallenge Client Headers

by hacker (Priest)
on May 21, 2003 at 11:53 UTC ( [id://259693]=note: print w/replies, xml ) Need Help??


in reply to HTTPChallenge Client Headers

I'm not sure I completely understand the question, but I'll try anyway..

If you're trying to just get the data, while passing the authentication to the Basic Authentication you've got set up, you can do it in the following fashion (using LWP):

use strict; use LWP::UserAgent; my $url = 'https://intranet.com/some/page.html'; my $browser = LWP::UserAgent->new(); $browser->protocols_allowed(["http", "https"]); unless ($browser->is_protocol_supported("https")) { die "Cannot use https:// URLs\n"; } $browser->credentials("intranet.com:443", "My Realm", "johndoe", "0bScUr3d"); my $response = $browser->get($url);

Work with this code snippet, and get something similar working in your CGI.. you should have no trouble from there.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://259693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-23 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found