jrottman
Programmer
- Jun 17, 2005
- 47
I am re-writing my rets application in perl, and I have found a few modules that will help me on my way. One of them being
During my testing, I have tested both system curl and perl curl. At this point I can get the system curl to correctly connect to my server. However, I am having the hardest time trying to figure out why I cant get perl curl to connect to the server.
Everytime I try to connect, I get a 401 error. I am using the same connection method that I would use if I was using system curl.
Here is my current code. Any help with this is greatly appreciated.
Perl Code w/ -
Perl code w/ system curl
During my testing, I have tested both system curl and perl curl. At this point I can get the system curl to correctly connect to my server. However, I am having the hardest time trying to figure out why I cant get perl curl to connect to the server.
Everytime I try to connect, I get a 401 error. I am using the same connection method that I would use if I was using system curl.
Here is my current code. Any help with this is greatly appreciated.
Perl Code w/ -
Code:
$curl->setopt(CURLOPT_URL, $site);
$curl->setopt(CURLOPT_USERPWD,'{$user}:{$pass}');
$curl->setopt(CURLOPT_HTTPAUTH,CURLAUTH_DIGEST);
$curl->perform;
my $err = $curl->errbuff;
my $info = $curl->getingo(CURLINFO_HTTP_CODE);
Perl code w/ system curl
Code:
system("curl -u $user:$pass --digest $site");