cURL / Mailing Lists / curl-users / Single Mail

curl-users

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

From: Hongyi Zhao <hongyi.zhao_at_gmail.com>
Date: Wed, 8 Apr 2015 23:00:13 +0800

Thanks a lot for your hints.

Regards

2015-04-06 23:36 GMT+08:00 Daniel Stenberg <daniel_at_haxx.se>:

> 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
>

-- 
Hongyi Zhao <hongyi.zhao_at_gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493

-------------------------------------------------------------------
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-08