I am working on a revamp of a previous application that I have written in coldfusion. The application deals with RETS data. The issue that I am having is with using the curl option HTTP_AUTH and CURLAUTH_DIGEST .
When attempting to authenticate against the server. No matter what I try, my authentication always fails. I have made sure to validate the auth information.
In my testings, I have also verified that curl can authenticate via the command line option.
Here is my current testing code base.
This is the error I receive back.
< HTTP/1.1 401 Unauthorized
HTTP/1.1 401 Unauthorized
< Content-Length: 1944
Content-Length: 1944
< Content-Type: text/html
Content-Type: text/html
< Server: Microsoft-IIS/6.0
Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
< WWW-Authenticate: Digest qop="auth",real m="rets@marketl inx.com",nonce= "343baa915fcdf5 13c28822dd5e99f 683",opaque="06 0518134015940"
WWW-Authenticate: Digest qop="auth",real m="rets@marketl inx.com",nonce= "343baa915fcdf5 13c28822dd5e99f 683",opaque="06 0518134015940"
< Date: Tue, 06 May 2008 18:13:40 GMT
Date: Tue, 06 May 2008 18:13:40 GMT
< Connection: close
Connection: close
When attempting to authenticate against the server. No matter what I try, my authentication always fails. I have made sure to validate the auth information.
In my testings, I have also verified that curl can authenticate via the command line option.
Here is my current testing code base.
Code:
my $curl= new WWW::Curl::easy; $curl->setopt(CURLOPT_VERBOSE,1); $curl->setopt(CURLOPT_HTTPAUTH,CURLAUTH_ANY); $curl->setopt(CURLOPT_USERPWD, '$user:$pass'); $curl->setopt(CURLOPT_URL, $site); my $retcode = $curl->perform; print $retcode;
This is the error I receive back.
< HTTP/1.1 401 Unauthorized
HTTP/1.1 401 Unauthorized
< Content-Length: 1944
Content-Length: 1944
< Content-Type: text/html
Content-Type: text/html
< Server: Microsoft-IIS/6.0
Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
< WWW-Authenticate: Digest qop="auth",real m="rets@marketl inx.com",nonce= "343baa915fcdf5 13c28822dd5e99f 683",opaque="06 0518134015940"
WWW-Authenticate: Digest qop="auth",real m="rets@marketl inx.com",nonce= "343baa915fcdf5 13c28822dd5e99f 683",opaque="06 0518134015940"
< Date: Tue, 06 May 2008 18:13:40 GMT
Date: Tue, 06 May 2008 18:13:40 GMT
< Connection: close
Connection: close
Comment