cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl range option does not work

From: Ram <ramkumar.h_at_gmail.com>
Date: Mon, 22 Jun 2009 01:44:40 -0400

Hi,
  I tried retrieving the first 100 bytes of a website using the -r 0-100
option but it gives the full content. It received the whole 120k of the
page. The range option whatever be the value does not seem to work.
Also given below is the verbose mode output of the request and curl version
that i use.

Am i missing something here to make this work? Please help. Thanks.

CURL VERSION USED:
>curl -V
curl 7.19.5 (i386-pc-win32) libcurl/7.19.5 OpenSSL/0.9.8k zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: Largefile NTLM SSL SSPI libz

>curl -r 0-100 http://netscape.aol.com -o netscape.txt
  % Total % Received % Xferd Average Speed Time Time Time
Current
                                 Dload Upload Total Spent Left
Speed
100 120k 0 120k 0 0 192k 0 --:--:-- --:--:-- --:--:--
264k

>curl -r 0-100 http://netscape.aol.com -v
* About to connect() to netscape.aol.com port 80 (#0)
* Trying 64.12.175.129... connected
* Connected to netscape.aol.com (64.12.175.129) port 80 (#0)
> GET / HTTP/1.1
> Range: bytes=0-100
> User-Agent: curl/7.19.5 (i386-pc-win32) libcurl/7.19.5 OpenSSL/0.9.8k
zlib/1.2
.3
> Host: netscape.aol.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 22 Jun 2009 05:33:46 GMT
< Server: Apache-Coyote/1.1
< Pragma: no-cache
< Cache-Control: no-cache, no-store, private, max-age=0
< Expires: 0
< R-Host: portaltc-lm106.websys.aol.com
< Content-Type: text/html;;charset=utf-8
< Set-Cookie: POP_COOKIE=name=ZmxtMTIxMjQ1NjQ4ODI2eA%3d%3d; Domain=aol.com;
Expi
res=Wed, 22-Jun-2011 05:33:46 GMT; Path=/
< Set-Cookie: stips=1; Path=/
< Transfer-Encoding: chunked

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-06-22