cURL / Mailing Lists / curl-users / Single Mail

curl-users

Requested range is entirely out of the file, but curl still return with exit status of 0.

From: Hongyi Zhao <hongyi.zhao_at_gmail.com>
Date: Wed, 29 Apr 2015 13:37:33 +0800

Hi all,

See the following testings:

$ curl -s -I http://ftp.cn.debian.org/debian/README |
grep '^Content-Length:'
Content-Length: 1495

$ curl -s -r 1600-1700 http://ftp.cn.debian.org/debian/README 2>&1 >/dev/
null

$ echo $?
0

So strange. In the above case, the requested range is entirely out of
the ranges of the file. But still curl will return will status of 0.

Notes. WRT the curl version for my case, see the following:

$ curl -V
curl 7.42.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.42.0-DEV
OpenSSL/1.0.1e zlib/1.2.7 c-ares/1.9.1 libidn/1.25 libssh2/1.4.2
librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM
NTLM_WB SSL libz TLS-SRP UnixSockets Metalink

Regards

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