I am using libcurl
library to fetch abc-1.tar
file from server. I want to know meaning of message which is display and process of execution of libcurl
to display this messages.
For Example: I provide some messages below out of that I know basic message meaning like Content-Length
means length of file which are downloaded, etc.
I want meaning of all messages, particularly messages which are start with *
(e. g. Connection #0 to host (nil) left intact
)
* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (182.72.67.14) port 65101 (#0)
GET /...... HTTP/1.1
Host: 182.72.67.14:65101
Accept: */*
Connection:keep-alive
< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Length: 186368
< Content-Type: application/x-tar
< Server: Microsoft-IIS/7.5
< Content-Disposition: attachment; filename=abc-1.tar
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Date: Tue, 01 Oct 2013 06:29:00 GMT
<
* Connection #0 to host (nil) left intact
cURL's Man Page specifies three types of "special" verbose output:
A line starting with '>' means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl.
You can read about HTTP header fields in the HTTP official publication page. Any other output lines displayed by cURL belong to the HTTP body carried by the corresponding message.
So what is the actual meaning of these informationals starting with *
, you ask? They inform you about the status of the transfer's TCP connection with the host. For instance:
"Connected to (nil) (182.72.67.14) port 65101 (#0)"
means that a TCP connection is established with the server side (in your case: 182.72.67.14). The #0
is the TCP session number (which is used only by cURL). The nil
indicates that the host name couldn't be resolved via DNS (had it been resolved, the it would've appeared instead of nil
).
"Connection #0 to host (nil) left intact"
means that although the transfer is over, the TCP session itself is still open (i.e no FIN/ACK exchanges have been made), allowing you to keep reusing the same TCP connection for multiple transfers (which could be useful if you don't want to sacrifice time on opening a new TCP connection).
The message "Re-using existing connection! (#0) with host (nil)"
supports that, indicating that cURL does indeed that, riding an existing TCP connection (from a previous transfer).
Marked by <
are HTTP headers.You can read in detail about http headers and their meaning here
and marked by *
are verbose information provided by curl
which is displayed on stderr
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With