in reply to Re^3: Better Solution To WWW::Mechanize Basic Authentication
in thread Better Solution To WWW::Mechanize Basic Authentication

MidLifeXis,
Yes, get_basic_credentials() is called but, unless overidden, just pulls the information from credentials(). As it turns out, WWW::Mechanize does overide the method but just marginally.

None of that changes why it is isn't working. In other words, calling $mech->credentials() before calling $mech->submit() should "just work" but it doesn't.

Are you suggesting subclassing WWW::Mechanize to hard code the values on a per-instance basis? That seems further from my objective (work within the confines of WWW::Mechanize).

Cheers - L~R

Replies are listed 'Best First'.
Re^5: Better Solution To WWW::Mechanize Basic Authentication
by MidLifeXis (Monsignor) on Oct 19, 2009 at 17:45 UTC

    I was unfamiliar with the credentials() function, and had always grabbed the get_basic_credentials() call to do my stuff - blame it on my not reading carefully. :-/

    I have had that type of an error (I won't say exact, because I don't remember it exactly) happen when no_proxy wasn't working the way that I thought, and an internal site was hitting the outside proxy. Since the outer proxy didn't recognize the internal username and password, and could not have even connected to the internal server, I was hosed from the start.

    I seem to remember there being a way to force verbose output, and using that to find out what was actually happening.

    --MidLifeXis