cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Howto question - SOAP on the command line

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Tue, 19 Apr 2005 23:46:20 -0500

OK, I think I may see what's going on. I've trimmed the debug output
to make it easier to explain. Wget starts off sending Basic Auth

> POST /tvlistings/xtvdService HTTP/1.0
> Host: datadirect.webservices.zap2it.com
> Authorization: Basic ljydtdgyf5t79870ryghuggi=
> Content-Type: application/x-www-form-urlencoded

but that's rejected by the server: A demand for Digest Auth is returned:

 
> HTTP request sent, awaiting response... HTTP/1.1 401 Unauthorized
> Date: Wed, 20 Apr 2005 01:22:02 GMT
> 2 Date: Wed, 20 Apr 2005 01:22:02 GMTServer: Orion/2.0.2
> 3 Server: Orion/2.0.2Connection: Close
> 4 Connection: CloseContent-Type: text/html
> 5 Content-Type: text/htmlWWW-Authenticate: Digest
> realm="TMSWebServiceRealm",
> nonce="PDExMTM5NjAxMjMxNzcuNGJmY2Q3YTdiMDg5MjMzYzNhMDA4M2I3NmRmNzkzODZAc
> HJpbWV0aW1lPg==", opaque="a064ab3c7afaa4cf", algorithm=MD5, qop="auth"
>
> 6 WWW-Authenticate: Digest realm="TMSWebServiceRealm",
> nonce="PDExMTM5NjAxMjMxNzcuNGJmY2Q3YTdiMDg5MjMzYzNhMDA4M2I3NmRmNzkzODZAc
> HJpbWV0aW1lPg==", opaque="a064ab3c7afaa4cf", algorithm=MD5, qop="auth"

Wget closes the connection, then retries using Digest Auth:

> POST /tvlistings/xtvdService HTTP/1.0
> User-Agent: Wget/1.9.1
> Host: datadirect.webservices.zap2it.com
> Accept: */*
> Connection: Keep-Alive
> Authorization: Digest username="userid", realm="TMSWebServiceRealm",
> nonce="PDExMTM5NjAxMjMxNzcuNGJmY2Q3YTdiMDg5MjMzYzNhMDA4M2I3NmRmNzkzODZAc
> HJpbWV0aW1lPg==", uri="/tvlistings/xtvdService",
> response="27b41196dda61ef84158df43f501b1fe", opaque="a064ab3c7afaa4cf"

and the server is happy. Curl starts off sending Basic Auth too:

> 0000: POST /tvlistings/xtvdService HTTP/1.1
> 0027: Authorization: Basic ljydtdgyf5t79870ryghuggi=

gets the same "Unauthorised" response, along with the demand for
Digest Auth. Curl then tells you the bad news and stops.

> 0000: HTTP/1.1 401 Unauthorized
> 0000: Date: Wed, 20 Apr 2005 02:05:12 GMT
> <= Recv header, 197 bytes (0xc5)
> 0000: WWW-Authenticate: Digest realm="TMSWebServiceRealm", nonce="PDEx

I'll leave it to Daniel to decide if curl should be switching from
Basic to Digest in mid-stream. What you could try next would be to
*tell* curl to send Digest Auth the first time around:

     curl --digest -u userid:userpwd .......

Ralph Mitchell
Received on 2005-04-20

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET