cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: The curl --range option and the unix/win format of files.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 6 Apr 2015 17:36:17 +0200 (CEST)

On Mon, 6 Apr 2015, Hongyi Zhao wrote:

> curl -r 0-499 /path/to/url
>
> In the above command, would the curl use the unix file format or the win/
> dos format of line feeds to count the bytes for downloading?

HTTP does no distinction. The server serves whatever.

> If this count is based on the server's side, does this mean the curl will
> leave it as the original unix or win/dos formats as they are regardless what
> the client sides filesystems and OSs are?

That request asks the server to send the first 500 bytes of the file.
Including all line endings (or not) that the resource contains. The server
will then figure out those bytes and send them.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-04-06