Menu

#1305 curl glob counter mismatch with {} list

closed-fixed
globbing (2)
5
2014-04-24
2013-11-16
No

Reported by Michael-O on the curl-users list: http://curl.haxx.se/mail/archive-2013-11/0038.html

The command line like:

"curl http://curl.haxx.se/docs/{manpage,libs}.html"

will say

[1/3]: http://curl.haxx.se/docs/manpage.html --> manpage.html

etc, and then download the [2/3] and then stop. The command line only specifies two versions.

This problem exists in 7.33.0 and has not been fixed since-

Discussion

  • fernando

    fernando - 2013-11-16
    $ curl -V
    curl 7.33.0 (i386-pc-win32) libcurl/7.33.0 OpenSSL/1.0.0k zlib/1.2.8 libidn/1.18 libssh2/1.4.3 librtmp/2.3
    Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
    Features: AsynchDNS GSS-Negotiate IDN Largefile NTLM SPNEGO SSL SSPI libz
    
    $ curl -O localhost/foobar{01,02}.txt
    
    [1/3]: localhost/foobar0102 --> foobar0102
    --_curl_--localhost/foobar0102
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100    88  100    88    0     0   5500      0 --:--:-- --:--:-- --:--:--  5500
    
    [2/3]: localhost/foobar0202 --> foobar0202
    --_curl_--localhost/foobar0202
    100    88  100    88    0     0   5866      0 --:--:-- --:--:-- --:--:--  5866
    
    $ curl -O localhost/foobar[01-02].txt
    
    [1/3]: localhost/foobar01localhost --> foobar01localhost
    --_curl_--localhost/foobar01localhost
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100    88  100    88    0     0   5500      0 --:--:-- --:--:-- --:--:--  5500
    
    [2/3]: localhost/foobar02localhost --> foobar02localhost
    --_curl_--localhost/foobar02localhost
    100    88  100    88    0     0   5500      0 --:--:-- --:--:-- --:--:--  5500
    
    $ set path=%p%
    
    $ cd..
    
    $ curl -V
    curl 7.32.0 (i386-pc-win32) libcurl/7.32.0 OpenSSL/1.0.1e zlib/1.2.8 libidn/1.18 libssh2/1.4.3 librtmp/2.3
    Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
    Features: AsynchDNS GSS-Negotiate IDN Largefile NTLM SPNEGO SSL SSPI libz
    
    $ curl -O localhost/foobar{01,02}.txt
    
    [1/2]: localhost/foobar01.txt --> foobar01.txt
    --_curl_--localhost/foobar01.txt
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  295k  100  295k    0     0  18.0M      0 --:--:-- --:--:-- --:--:-- 18.0M
    
    [2/2]: localhost/foobar02.txt --> foobar02.txt
    --_curl_--localhost/foobar02.txt
    100  295k  100  295k    0     0   295k      0  0:00:01 --:--:--  0:00:01  295k
    
    $ curl -O localhost/foobar[01-02].txt
    
    [1/2]: localhost/foobar01.txt --> foobar01.txt
    --_curl_--localhost/foobar01.txt
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  295k  100  295k    0     0  9546k      0 --:--:-- --:--:-- --:--:-- 9546k
    
    [2/2]: localhost/foobar02.txt --> foobar02.txt
    --_curl_--localhost/foobar02.txt
    100  295k  100  295k    0     0  18.0M      0 --:--:-- --:--:-- --:--:-- 18.0M
    
    $
    
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-11-28
    • status: open-confirmed --> closed-fixed
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-11-28

    thanks for the report, now fixed in git