I am working on an iOS application, which needs basically functionality like µTorrent. I am able to download and upload through the app using a web service (API) created in PHP.

I get to know that I should also configure my web service and server for pause and resume the downloads and uploads?

I read somewhere that, If I'll pass the range in headers of the request through my app, then if server is capable of accept the range then it'll start the download and upload from when it stopped.

I want to know how I can configure my server to accept the ranges? And start the upload and download from it last?

  • Cross posted to StackOverflow: stackoverflow.com/questions/18285752/…
    – Rex
    Aug 21, 2013 at 5:56
  • @Rex, Yes! I'd already posted that question on SO! Because that's for handling the stuff from iOS environment. I posted my question here for server side configurations. Let me know if you want more information.
    – Hemang
    Aug 21, 2013 at 5:58
  • There is no "server side" component. This would all be done in the code.
    – Rex
    Aug 21, 2013 at 5:59
  • @Rex, I read somewhere that, if you'll pass range in a request to the server, then the server should capable to regenerate the image of that particular resource from where it stopped last. Here I am totaly unaware of those things!
    – Hemang
    Aug 21, 2013 at 6:01
  • 1
    – Rex
    Aug 21, 2013 at 6:11

1 Answer 1


By default all HTTP/1.1 compliant servers accept range headers and respond with content-range headers. (sysadmin part)

You don't need to change anything on webserver for ul/dl. Everything depends on how clients are downloading and uploading files. Maybe it's not the mechanism what you are looking for. (development part)

I think this is question for https://stackoverflow.com/

  • Thanks for the detailed answer GioMac! +1 for that. I already asked a question on SO but I think this is server related question, so I asked here:) Please let me know if you've any link for the same.
    – Hemang
    Aug 17, 2013 at 13:14
  • You're welcome. If you are accessing file directly - web server will do the thing. Through PHP - I don't know. My dev skills are poor.
    – GioMac
    Aug 17, 2013 at 13:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.