cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: BUG: HTTP server doesn't seem to support byte ranges. Cannot resume.

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Thu, 4 Apr 2013 12:18:21 +0200

sdrfnord <sdrfnord_at_gmx.de> wrote:

> I noticed a problem with curl. When a file is already downloaded completely and
> curl is executed again using -C - then curl says "curl: (33) HTTP server doesn't
> seem to support byte ranges. Cannot resume."
>
>
> $ curl -C - http://www.heise.de -o heise.de
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 100 118k 0 118k 0 0 5522 0 --:--:-- 0:00:21 --:--:-- 14107
>
> $ curl -C - http://www.heise.de -o heise.de
> ** Resuming transfer from byte position 121015
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
> curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.

As far as I can tell the server does ignore byte ranges:

fk@r500 ~ $curl --silent -v -H "Range: bytes=5-10" -o /dev/null http://www.heise.de
* STATE: INIT => CONNECT handle 0x801ca7088; line 1001 (connection #-5000)
* About to connect() to proxy 10.0.0.1 port 8118 (#0)
* Trying 10.0.0.1...
* Adding handle: conn: 0x801cdb608
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* 0x801c3f008 is at send pipe head!
* - Conn 0 (0x801cdb608) send_pipe: 1, recv_pipe: 0
* STATE: CONNECT => WAITCONNECT handle 0x801ca7088; line 1048 (connection #0)
* Connected to 10.0.0.1 (10.0.0.1) port 8118 (#0)
* STATE: WAITCONNECT => DO handle 0x801ca7088; line 1167 (connection #0)
> GET http://www.heise.de/ HTTP/1.1
> User-Agent: curl/7.30.0-DEV
> Host: www.heise.de
> Accept: */*
> Proxy-Connection: Keep-Alive
> Range: bytes=5-10
>
* STATE: DO => DO_DONE handle 0x801ca7088; line 1253 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x801ca7088; line 1370 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x801ca7088; line 1381 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Date: Thu, 04 Apr 2013 10:15:07 GMT
* Server Apache is not blacklisted
< Server: Apache
< Expires: Thu, 04 Apr 2013 10:20:07 GMT
< Vary: User-Agent,Accept-Encoding
< Cache-control: max-age=300
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: keep-alive
<
{ [data not shown]
* STATE: PERFORM => DONE handle 0x801ca7088; line 1550 (connection #0)
* Closing connection 0
* The cache now contains 0 members

> I don't think that this is the intended behaviour. Wget does notice that the
> file is already complete.

Does wget get different headers from the server?

I think it could be argued that curl's message isn't as precise
as it could be, but the "Cannot resume" part seems correct to me.

Fabian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2013-04-04