Re: CFNetwork and 404
Re: CFNetwork and 404
- Subject: Re: CFNetwork and 404
- From: Becky Willrich <email@hidden>
- Date: Mon, 3 May 2004 17:17:00 -0700
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.
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).
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.