cURL / Mailing Lists / curl-users / Single Mail

curl-users

Problem with file:// URLs and zero-length files

From: BuraphaLinux Server <buraphalinuxserver_at_gmail.com>
Date: Thu, 31 May 2007 16:50:14 +0700

Curl fails to transfer 0-length files when using file:// URLs
Do I need some magic switch to say "even if empty create the
destination file" ?

bash-3.2$ curl -o blcdtools-9.999-i586-999.tgz
file:///home/zappaman/blcdtools/testing/101/blcdtools-9.999-i586-999.tgz
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
bash-3.2$ ls -ld
/home/zappaman/blcdtools/testing/101/blcdtools-9.999-i586-999.tgz
-rw-r--r-- 1 zappaman zappaman 0 May 31 16:41
/home/zappaman/blcdtools/testing/101/blcdtools-9.999-i586-999.tgz
bash-3.2$
bash-3.2$ curl --version
curl 7.16.3-20070523 (i586-pc-linux-gnu) libcurl/7.16.3-20070523
OpenSSL/0.9.8e zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: Largefile NTLM SSL libz
Received on 2007-05-31