cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2831736 ] last range within config file used for all requests

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 04 Aug 2009 07:53:36 +0000

Bugs item #2831736, was opened at 2009-08-04 00:07
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2831736&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: client module
Group: wrong behaviour
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Brad (bradtofel)
Assigned to: Daniel Stenberg (bagder)
Summary: last range within config file used for all requests

Initial Comment:
Specifying multiple url-range tuples in a config file:

url=http://localhost/ten.txt
range=0-1
url=http://localhost/ten.txt
range=2-3

results in range 2-3 being output twice:

# echo -n 0123456789 > /var/www/ten.txt
# curl -s http://localhost/ten.txt
0123456789
# curl -r 0-1 -s http://localhost/ten.txt
01
# for r in 0-1 2-3; do echo url=http://localhost/ten.txt; echo range=$r; done | curl -s -K -
2323
#

# curl -V
curl 7.19.5 (x86_64-unknown-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
# uname -a
Linux brad-snaz 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 22:12:12 UTC 2009 x86_64 GNU/Linux
#

running with the --libcurl option shows that the final 'range' value is used for both requests. Compiling the generated C program with the correct ranges and executing results in the expected output.

----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2009-08-04 09:53

Message:
This is in fact not a bug, but just now the command line tool works. It is
even quite clearly documented "If this option is used several times, the
last one will be used."

There could be more fancy ways to specify options for specific URLs when
you specify multiple ones, but there aren't. You're then better off either
scripting multiple curl invokes or writing your own tool with libcurl or a
libcurl binding using your favorite scripting language.

If you want to discuss further around this, feel welcome to the curl-users
mailing list!

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2831736&group_id=976
Received on 2009-08-04

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET