• 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: NSURLConnection and resumes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection and resumes


  • Subject: Re: NSURLConnection and resumes
  • From: Rudi Sherry <email@hidden>
  • Date: Wed, 06 Oct 2004 20:10:47 -0700

If the server accepts byte-range requests you could add a Range header to the request; here's a sample:

[ URLRequest setValue: @"bytes=100032-433566" forHTTPHeaderField: @"Range" ];

.. assuming you know how large the file is. The first number is the byte offset from the beginning of the file and the second number is the last byte offset that you'll receive (remember that it's inclusive, so the last byte index is one less than the length of the file).

If the server allows byte-range requests, you'll probably get a multi-part message with one part; if the server doesn't support them, you'll get the entire file.

On Oct 6, 2004, at 4:51 PM, John Stiles wrote:

I'm using NSURLConnection with a custom delegate to download a large file from the web.
If I have the first half of the file already, how can I ask for an HTTP resume so I can start downloading from the middle? The data won't be in the cache, since I got the partial download via a custom networking protocol and not any NSURL code.

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

This email sent to email@hidden

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

This email sent to email@hidden
  • Follow-Ups:
    • Re: NSURLConnection and resumes
      • From: Frederick Cheung <email@hidden>
    • How to "reset" Finder state
      • From: Brant Sears <email@hidden>
References: 
 >NSURLConnection and resumes (From: John Stiles <email@hidden>)

  • Prev by Date: Re: cocoa/obj-c type daemon
  • Next by Date: How to "reset" Finder state
  • Previous by thread: NSURLConnection and resumes
  • Next by thread: How to "reset" Finder state
  • Index(es):
    • Date
    • Thread