|
Hi,
I'm attempting to do Digest auth in perl using the curl module (version 4.13). Currently when the server sends the 401 and closes the connection the perl client doesn't re-try with the auth credentials.
code snippet with curl options:
my $curl = WWW::Curl::Easy->new;
$curl->setopt(CURLOPT_HTTPGET, 1);
$curl->setopt(CURLOPT_HTTPVERION_1_1, 1);
$curl->setopt(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
$curl->setopt(CURLOPT_USERPWD, "admin:system");
$curl->setopt(CURLOPT_PRIVATE,$curlId);
$curl->setopt(CURLOPT_URL, $url);
$curl->setopt(CURLOPT_VERBOSE, 1);
if (@headers){
$curl->setopt(CURLOPT_HTTPHEADER, \@headers);
}
$curl->perform;
Thanks |