Date: Wed, 19 Feb 2014 17:57:49 -0800
From: "Quinn \"The Eskimo!\"" <
email@hidden>
To: "
email@hidden Programming"
<
email@hidden>
Subject: Re: Testing resumeData from cancelByProducingResumeData:
Message-ID: <
email@hidden">
email@hidden>
Content-Type: text/plain; charset=us-ascii
On 19 Feb 2014, at 17:31, Scott Hancher <
email@hidden> wrote:
> What is required of my test server for it to support the creation
of a non-nil NSData object from cancelByProducingResumeData?
Last I checked to get resume data you must meet all the following criteria:
A. The scheme of the requested URL must be "http" or "https".
B. The request's method must be "GET".
C. The response must be an NSHTTPURLResponse (which should always be the case given point A).
D. The response must include either the "ETag" or "Last-Modified" headers (or both).
E. The file to which the task is downloading must be present. This file
is managed internally by NSURLSession, so you shouldn't trip over this
case (unless there's been a cache folder cleanup in the interim).
Share and Enjoy
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
Date: Wed, 19 Feb 2014 17:31:06 -0800
From: Scott Hancher <
email@hidden>
To:
email@hidden
Subject: Testing resumeData from cancelByProducingResumeData:
Message-ID:
<
email@hidden>
Content-Type: text/plain; charset="utf-8"
I'm currently working on some code that uses NSURLSessionDownloadTask's
cancelByProducingResumeData: to support cancelling/resuming of downloads,
and although I can get a non-nil NSData object from this method on
downloading from a network server, I can't seem to get a non-nil NSData
object when using a test server based on a BSD socket and responding to a
localhost URL. My test server works for numerous other test cases, but this
one's got me stumped. What is required of my test server for it to support
the creation of a non-nil NSData object from cancelByProducingResumeData?
Thank you,
Scott.