WWW::Mechanize and NTLM authentication

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

Threaded View
I'm having problems with a script to verify if a web app is up and
running.  I initially received http code 401, which I believe is due to
NTLM authentication.  After searching through CPAN, I came across the
example in LWP::Authen::Ntlm.

I've modified my code by adding keep_alive, and calling credentials, as
# Set up the mech.
my $mech1 = WWW::Mechanize->new( autocheck=>1, keep_alive=>1 );
$mech1->agent_alias( 'Windows IE 6' );
print "Setting up credentials\n";
$mech1->credentials($web_addr, '', $domain1$userid1, $pswd1);

# Try to get the login page.
print "Getting the url - $web_addr \n";
$mech1->get( $web_addr );

Here's the output with debug on:
Setting up credentials
Getting the url - http://app.group.com
LWP::UserAgent::request: ()
HTTP::Cookies::add_cookie_header: Checking app.group.com for cookies
HTTP::Cookies::add_cookie_header: Checking .group.com for cookies
HTTP::Cookies::add_cookie_header: Checking group.com for cookies
HTTP::Cookies::add_cookie_header: Checking .com for cookies
LWP::UserAgent::send_request: GET http://app.group.com
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 811 bytes
LWP::Protocol::collect: read 1896 bytes
LWP::Protocol::collect: read 1724 bytes
LWP::UserAgent::request: Simple response: Unauthorized
LWP::Authen::Ntlm::authenticate: authenticate() has been called
Use of uninitialized value in exists at
/mydir/usr/local/perl5/lib/site_perl/5.8.5/LWP/UserAgent.pm line 566.
LWP::Authen::Ntlm::authenticate: No username and password available
from get_basic_credentials().  Returning unmodified response object
Error GETing http://app.group.com : Access Denied at ping-share.pl line

Any help would be appreciated.

Re: WWW::Mechanize and NTLM authentication

fat side up.
Place uncovered in 500 oven for 20 minutes, reduce oven to 325.
Bake till medium rare (150) and let roast rest.
Pour stock over onions and drippings, carve the meat and
   place the slices in the au jus.

Bisque l?Enfant

Honor the memory of Grandma with this dish by utilizing her good
silver soup tureen and her great grandchildren (crawfish, crab or
lobster will work just as well, however this dish is classically
made with crawfish).

Stuffed infant heads, stuffed crawfish heads, stuffed crab or lobster shells;
   make patties if shell or head is not available
   (such as with packaged crawfish, crab, or headless baby).
bell peppers
garlic salt, pepper, etc.
3 cups chicken stock
2 sticks butter
3 tablespoons oil

First stuff the heads, or make the patties (see index)
   then fry or bake.  
Set aside to drain on paper towels.
Make a roux with butter, oil and flour,
   brown vegetables in the roux, then add chicken stock and
   allow to simmer for 20 minutes.
Add the patties or stuffed heads, and some loose crawfish,
   lobster, long piglet, or what have you.
Cook on low for 15 minutes, then allow it to set for at least
   15 minutes more.
Serve over steamed rice; this dish is very impressive!

Stuffed Cabbage Rolls

Babies really can be found under a cabbage leaf -
or one can arrange for ground beef to be found there instead.

8 large cabbage leaves
1 lb. lean ground newborn human filets, or ground chuck
soy sauce
salt pepper, etc
Olive oil
Tomato Gravy (see index)

Boil the cabbage leaves for 2 minutes to soften.
In skillet, brown the meat in a little olive oil,
   then add onions, peppers, and celery (all chopped finely)
   and se

Site Timeline