NSURLProtocol - connection never receives response till protocol finishes
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