• 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: 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.


  • Follow-Ups:
    • Re: CFNetwork and 404
      • From: Ricky Sharp <email@hidden>
References: 
 >Re: CFNetwork and 404 (From: Ricky Sharp <email@hidden>)
 >Re: CFNetwork and 404 (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: CFNetwork and 404
  • Next by Date: Re: CFNetwork and 404
  • Previous by thread: Re: CFNetwork and 404
  • Next by thread: Re: CFNetwork and 404
  • Index(es):
    • Date
    • Thread