about to begin. This includes all pre-transfer commands and negotiations that
are specific to the particular protocol(s) involved.
.TP
+.B time_redirect
+The time, in seconds, it took for all redirection steps include name lookup,
+connect, pretransfer and transfer before final transaction was
+started. time_redirect shows the complete execution time for multiple
+redirections. (Added in 7.12.3)
+.TP
.B time_starttransfer
The time, in seconds, it took from the start until the first byte is just about
to be transfered. This includes time_pretransfer and also the time the
.TP
.B num_connects
Number of new connects made in the recent transfer. (Added in 7.12.3)
+.TP
+.B num_redirects
+Number of redirects that were followed in the request. (Added in 7.12.3)
.RE
If this option is used several times, the last one will be used.
VAR_EFFECTIVE_URL,
VAR_CONTENT_TYPE,
VAR_NUM_CONNECTS,
+ VAR_REDIRECT_TIME,
+ VAR_REDIRECT_COUNT,
VAR_NUM_OF_VARS /* must be the last */
} replaceid;
{"speed_upload", VAR_SPEED_UPLOAD},
{"content_type", VAR_CONTENT_TYPE},
{"num_connects", VAR_NUM_CONNECTS},
+ {"time_redirect", VAR_REDIRECT_TIME},
+ {"num_redirects", VAR_REDIRECT_COUNT},
{NULL, VAR_NONE}
};
curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &longinfo))
fprintf(stream, "%ld", longinfo);
break;
+ case VAR_REDIRECT_COUNT:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ case VAR_REDIRECT_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
case VAR_TOTAL_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))