• 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: Macnetworkprog Digest, Vol 10, Issue 80
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macnetworkprog Digest, Vol 10, Issue 80


  • Subject: Re: Macnetworkprog Digest, Vol 10, Issue 80
  • From: Kevin Yu <email@hidden>
  • Date: Tue, 03 Dec 2013 09:22:01 +0800


email@hidden 於 2013/12/3 上午4:00 寫道:


On 29 Nov 2013, at 04:33, Kevin Yu <email@hidden> wrote:

I’ve a HTTP request and Response looks like the following:

How did you create the response?  Some HTTP authentication methods require that the original URL be available in the response.  This happens automatically for responses you get from CFHTTPStream (via kCFStreamPropertyHTTPResponseHeader) but does not happen automatically for responses you create yourself.  The real kicker is that there's no public API to set this response URL; there's a fairly well-known private API, _CFHTTPMessageSetResponseURL, but that's not the same thing )-:

We're tracking this limitation as <rdar://problem/6980095>.

Please try using _CFHTTPMessageSetResponseURL and see if that gets authentication working.  If it does, let me know and I'll update the bug to indicate your interest in a fix.  And in that case the only /supported/ workaround is to implement Digest authentication yourself.
Thank you very much for your info; I’ve tried the _CFHTTPMessageSetResponseURL() function, and it WORKS!
The response was created by my code via CFHTTPMessageAppendBytes() function after get the data from socket.



If _CFHTTPMessageSetResponseURL doesn't fix things, let me know and I'll see if I can dig up anything else from my giant pile of weird CFNetwork trivial.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


regards,
KC
 _______________________________________________
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>
  • Prev by Date: Re: CFHTTPMessageAddAuthentication problem
  • Next by Date: Re: CFHTTPMessageAddAuthentication problem
  • Previous by thread: Re: A NSOutputStream vs. native socket question
  • Next by thread: Re: CFHTTPMessageAddAuthentication problem
  • Index(es):
    • Date
    • Thread