• 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: Testing resumeData from cancelByProducingResumeData:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing resumeData from cancelByProducingResumeData:


  • Subject: Re: Testing resumeData from cancelByProducingResumeData:
  • From: Scott Hancher <email@hidden>
  • Date: Thu, 20 Feb 2014 14:18:35 -0800

A missing ETag was the answer. I wasn't supplying one in this case.

Thank you,
Scott.


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.

 _______________________________________________
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: Testing resumeData from cancelByProducingResumeData:
  • Next by Date: Out of process download support
  • Previous by thread: Re: Testing resumeData from cancelByProducingResumeData:
  • Next by thread: Out of process download support
  • Index(es):
    • Date
    • Thread