Re: CFNetwork and 404
Re: CFNetwork and 404
- Subject: Re: CFNetwork and 404
- From: Ricky Sharp <email@hidden>
- Date: Mon, 3 May 2004 19:30:48 -0500
On May 3, 2004, at 7:17 PM, Becky Willrich wrote:
For CFNetwork, "error" means "something messed up the HTTP
conversation" - for instance, the underlying socket goes bad or can't
be established, or the server is sending bytes that are not
recognizable as HTTP. In other words, as long as the server sends a
valid HTTP response (like a 404), this is not considered an error
(after all, the HTTP transaction succeeded just fine...), and it's up
to the calling code to determine whether the response is acceptable.
This definitely makes sense.
You can detect these cases exactly as suggested - call
CFReadStreamCopyProperty(httpStream,
kCFStreamPropertyHTTPResponseHeader) to retrieve the HTTP response
sent by the server, then use the calls on CFHTTPMessage.h to examine
the status code (or anything else you want to know about the
response).
Thanks for the confirmation on what to do.
___________________________________________________________
Ricky A. Sharp
mailto:email@hidden
Founder & President
Instant Interactive(tm)
http://www.instantinteractive.com
_______________________________________________
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.