Re: CFNetwork HTTPS Sample Code
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.