curl-users
Re: The end-range is out of the range of the file, but curl doesn't care it.
Date: Tue, 28 Apr 2015 10:02:27 +0200 (CEST)
On Tue, 28 Apr 2015, Hongyi Zhao wrote:
> As you can see, the end-range is out of the range of the file, but curl
> still treat is as the successfully execution.
It does the same for an HTTP range:
$ curl -r 5-202 localhost -v
> GET / HTTP/1.1
> Host: localhost
> Range: bytes=5-202
> User-Agent: curl/7.42.0
> Accept: */*
>
< HTTP/1.1 206 Partial Content
< Date: Tue, 28 Apr 2015 08:00:04 GMT
< Server: Apache/2.4.10 (Debian)
< Last-Modified: Sat, 31 May 2014 22:05:33 GMT
< ETag: "d-4fab95c704b1c"
< Accept-Ranges: bytes
< Content-Length: 8
< Content-Range: bytes 5-12/13
< Content-Type: text/html
<
tinken
* Connection #0 to host localhost left intact
$ echo $?
0
> Any hints?
You mean you'd like that to fail? Can you motivate that?
-- / 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.htmlReceived on 2015-04-28