• 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: CFNetwork HTTPS Sample Code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFNetwork HTTPS Sample Code


  • Subject: Re: CFNetwork HTTPS Sample Code
  • From: Becky Willrich <email@hidden>
  • Date: Tue, 13 May 2003 17:01:04 -0700

Can someone please point me at functioning sample code for a CFNetwork HTTPS
implementation (yes, I've got the CFNetwork PDF and I've read CFHTTP, which
is how I created the existing code I've got working) so that I can try to
figure out what I'm doing wrong?

Look in /Developer/Examples/Networking/URLLoad; I believe it works for both HTTP and HTTPS URLs.

In particular, I'm getting errors from a domain that is not in CFStream.h
(domain 3, although I've also gotten kCFStreamErrorDomainHTTP), and I
haven't been able to find a solution for dealing with
kCFStreamErrorHTTPRedirectionLoop (I'm using auto-redirect), nor what causes
kCFStreamErrorHTTPParseFailure when the read stream opens properly, but
errors with negative bytes to read.

Domain 3 is the SSL domain; the errors map to errors in Security.framework/SecureTransport.h. Usually a domain 3 error indicates that something's wrong with the certificate provided by the server. HTTPRedirectionLoop is what you'd expect - the server is returning a redirection to URLs which cause a loop. HTTPParseFailure is caused when the server returns a series of bytes which can't be parsed as an HTTP response.

I'm using CFReadStream to do the serialization which works great for HTTP,
am I supposed to handle the serialization/deserialization myself when doing
HTTPS?

No; it should all work pretty much identically.

Hope that helps,
REW
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >CFNetwork HTTPS Sample Code (From: "Joe Pezzillo" <email@hidden>)

  • Prev by Date: CFNetwork HTTPS Sample Code
  • Next by Date: A configuration question
  • Previous by thread: CFNetwork HTTPS Sample Code
  • Next by thread: A configuration question
  • Index(es):
    • Date
    • Thread