• 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 and 404
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: CFNetwork and 404 (From: Ricky Sharp <email@hidden>)
 >Re: CFNetwork and 404 (From: Ricky Sharp <email@hidden>)
 >Re: CFNetwork and 404 (From: Becky Willrich <email@hidden>)

  • Prev by Date: Re: CFNetwork and 404
  • Next by Date: RE: CFSocket crash in Jaguar
  • Previous by thread: Re: CFNetwork and 404
  • Next by thread: about how to return the received packet to the OS in ethernet driver on MAC OS 9
  • Index(es):
    • Date
    • Thread