• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CFHTTPMessageAddAuthentication problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

---
regards,
KC

Jens Alfke <email@hidden> 於 2013/11/30 上午8:40 寫道:


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

  • Follow-Ups:
    • Re: CFHTTPMessageAddAuthentication problem
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
    • Re: CFHTTPMessageAddAuthentication problem
      • From: Jens Alfke <email@hidden>
  • Next by Date: Re: CFHTTPMessageAddAuthentication problem
  • Next by thread: Re: CFHTTPMessageAddAuthentication problem
  • Index(es):
    • Date
    • Thread