Re: CFHTTPMessageAddAuthentication problem
Re: CFHTTPMessageAddAuthentication problem
- Subject: Re: CFHTTPMessageAddAuthentication problem
- From: Kevin Yu <email@hidden>
- Date: Mon, 02 Dec 2013 10:12:23 +0800
Hi Jens,
Thanks for your info. Currently, I’m working on an application which needs to act as server and client role in the same time; The traffic flow like:
MyApp Server ——- GET——-----------> <——Challenge ——----- ——— GET/with auth—> <—— 200 OK ———— <—— POST ————— …
This is the reason that I can not use NSURLConnection, can I?
The strange thing to me is the NSURLConnection can work for the same server.
On Nov 28, 2013, at 11:34 PM, Kevin Yu <email@hidden> wrote:
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?
I don’t understand what this means; why do you need to accept an incoming HTTP request? The interaction you showed was sending a request to the server, which NSURLConnection handles.
I’m not sure why your code isn’t working; I’ve used the same function to handle digest authentication and it works fine for me, and your call looks correct. Maybe there’s something about the details of the server’s WWW-Authenticate response that is slightly syntactically incorrect. Try looking up the RFC for digest auth and comparing the server response.
—Jens
|
_______________________________________________
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