• 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
NSURLProtocol - connection never receives response till protocol finishes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURLProtocol - connection never receives response till protocol finishes


  • Subject: NSURLProtocol - connection never receives response till protocol finishes
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 03 Dec 2011 18:40:28 -0800

Still working on my NSURLProtocol implementation. I’ve got a type of response that needs to be delivered incrementally, so I immediately send the client -URLProtocol:didReceiveResponse:cacheStoragePolicy:, then later on send it one or more -URLProtocol:didLoadData:, then at the end send -
URLProtocolDidFinishLoading:.

The problem is that the NSURLConnection client on the main thread never gets any calls until the sender finishes completely. It doesn’t even hear about the response, even though the protocol sent it seconds ago and has been sending data.

I know this isn’t a limitation of CFNetwork, since obviously I can download large files from the net and the data arrives incrementally. So it seems to be something I’m doing wrong in my protocol, but from the documentation I can’t see what I should do differently.

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Returning custom NSURLResponse from NSURLProtocol
  • Next by Date: NSURLConnection's +sendAsynchronousRequest and threads
  • Previous by thread: Re: Returning custom NSURLResponse from NSURLProtocol
  • Next by thread: NSURLConnection's +sendAsynchronousRequest and threads
  • Index(es):
    • Date
    • Thread