Hey guys. I haven't tested this fully, and I don't suspect I'll have time today, so I'm firing off a quick email. With LWP::UserAgent, if you use the ->credentials feature, the UserAgent.pm code will dynamically load LWP::Authen::$type:

around line 534 in UserAgent.pm,v 2.3 2002/08/18 03:29:47:

    no strict 'refs';
    unless (%{"$class\::"}) {
        # try to load it
        eval "require $class";
        if ($@) {
            if ($@ =~ /^Can\'t locate/) {
                $response->header("Client-Warning" =>
                  "Unsupported authentication scheme '$scheme'");
            } else {
                $response->header("Client-Warning" => $@);
            }

PAR doesn't seem to suck this in without an explicit loading of
the module as "use LWP::Authen::Basic". Attempts to run code like:

  use LWP; my $browser = LWP::UserAgent->new;
  $browser->credentials('SERVER', 'REALM', "UN" => "PW");
  my $response = $browser->post( $url, %POST );

will fail with the "Unsupported authentication scheme 'Basic'" error.


-- Morbus Iff ( i put the demon back in codemonkey ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus



Reply via email to