Re: CFHTTPMessageAddAuthentication problem
Re: CFHTTPMessageAddAuthentication problem
- Subject: Re: CFHTTPMessageAddAuthentication problem
- From: Kevin Yu <email@hidden>
- Date: Fri, 29 Nov 2013 15:34:53 +0800
Hi Joby,
Thanks for your suggestion! As I have list the content of the response packet, the server’s challenge is:
Www-Authenticate: Digest realm=“MyDomain", nonce="MDAwNDcwOTY6RHJheXRlaw==", algorithm="MD5", qop="auth"
I think it means it needs to use kCFHTTPAuthenticationSchemeDigest scheme, right?
If I use NSURLConnection, and use connection:didReceiveAuthenticationChallenge:challenge function, it can work without problem; unfortunately, the NSURLConnection can only send HTTP request, it can not accept HTTP Request, it force me need to use CFHTTPXXX function set to deal with the server. Any idea?
Kevin,
You are getting return code 0 from CFHTTPMessageAddAuthentication its only because the web site you are trying to communicate does not support Digest Authentication. You can use CFHTTPMessageCopyAllHeaderFields(Response)for display all the header field and find authentication methods which supported by the Web Site.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden