curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

What does "} [43028 bytes data]" mean in a curl upload?

From: Michael Newman via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 26 Mar 2020 09:24:07 +0700

I'm having some problems with curl (7.64.0 on Raspbian Buster) uploading small jpeg files via ftp to a web host. The curl command I am using is:

curl -v -n --max-time 120 -T "$file" $host >> $log 2>&1

This works just fine almost all of the time. However, the reason I have the --max-time option is because sometimes a transfer stalls and doesn't give up for about 17 minutes. Since I'm uploading a webcam image every four minutes, the timeout has to be rather short.

The verbose output from curl **always** has the following two lines:

< 150 Accepted data connection
} [43028 bytes data]

Where does that 43028 bytes come from? It is definitely not the length of the file, but it is often the point at which the transfer fails.

Here's what a successful transfer looks like:

> STOR chaamtest.jpg
< 150 Accepted data connection
} [43028 bytes data]
* We are completely uploaded and fine
* Remembering we are in dir "public_html/"
< 226-File successfully transferred
< 226 0.178 seconds (measured here), 0.59 Mbytes per second
100 107k 0 0 100 107k 0 99816 0:00:01 0:00:01 --:--:-- 99816

And here's what a failed transfer looks like (in part):

< 150 Accepted data connection
} [43028 bytes data]
 97 44251 0 0 97 43028 0 27232 0:00:01 0:00:01 --:--:-- 27250
 97 44251 0 0 97 43028 0 16664 0:00:02 0:00:02 --:--:-- 16664
 97 44251 0 0 97 43028 0 12002 0:00:03 0:00:03 --:--:-- 12005
 97 44251 0 0 97 43028 0 9380 0:00:04 0:00:04 --:--:-- 9380
<snip>
 97 44251 0 0 97 43028 0 43 0:17:09 0:16:30 0:00:39 0
 97 44251 0 0 97 43028 0 43 0:17:09 0:16:31 0:00:38 0
 * Send failure: Connection timed out
 97 44251 0 0 97 43028 0 43 0:17:09 0:16:32 0:00:37 0
* Closing connection 0
curl: (55) Send failure: Connection timed out

Any ideas?

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-03-26