cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl does not detect 'no space left on device' during scp

From: Priyanka Shah <priyanka_at_insiemenetworks.com>
Date: Wed, 16 Jul 2014 12:52:17 -0700

Hello,
It looks like curl cannot detect 'no space left on device' when I try to
copy file using scp. It returns success, but the copied file size is zero
bytes.

$ curl --version
curl 7.36.0 (x86_64-unknown-linux-gnu) libcurl/7.36.0 OpenSSL/1.0.0
zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3
pop3s rtsp scp sftp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

I found a similar thread/bug report here, where curl was not detecting
ENOSPACE for small files.
http://curl.haxx.se/mail/archive-2009-11/0094.html

I tried the same steps from there, and curl errors out now for that
experiment. But I don't see any errors when I use scp.

$ ls -trl testfile
-rw-r--r-- 1 prishah2 prishah2 345898 Jun 17 10:31 testfile

$ curl -T testfile -u prishah2 scp://localhost/space/ -k
Enter host password for user 'prishah2':
  % Total % Received % Xferd Average Speed Time Time Time
 Current
                                 Dload Upload Total Spent Left
 Speed
  0 0 0 0 0 337k 0 71612 --:--:-- 0:00:04 --:--:--
95341
  0 0 0 0 0 337k 0 71595 --:--:-- 0:00:04 --:--:--
71595

$ echo $?
0

$ ls -trl /space/cores
-rw-r--r-- 1 prishah2 ifc 0 Jul 16 11:43 /space/testfile

Is this is known bug with curl? Is there some way I can detect this
situation from my application code?
Thanks,
Priyanka.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-18