mirror of
https://github.com/curl/curl.git
synced 2026-07-30 12:58:04 +03:00
Dirk Manske brought the patch that introduces two new CURLINFO_* values:
CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT.
This commit is contained in:
parent
29e873b12d
commit
62d205a2ec
7 changed files with 44 additions and 1 deletions
|
|
@ -103,6 +103,15 @@ void Curl_pgrsDone(struct connectdata *conn)
|
|||
}
|
||||
}
|
||||
|
||||
/* reset all times except redirect */
|
||||
void Curl_pgrsResetTimes(struct SessionHandle *data)
|
||||
{
|
||||
data->progress.t_nslookup = 0.0;
|
||||
data->progress.t_connect = 0.0;
|
||||
data->progress.t_pretransfer = 0.0;
|
||||
data->progress.t_starttransfer = 0.0;
|
||||
}
|
||||
|
||||
void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
|
||||
{
|
||||
switch(timer) {
|
||||
|
|
@ -134,6 +143,10 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
|
|||
case TIMER_POSTRANSFER:
|
||||
/* this is the normal end-of-transfer thing */
|
||||
break;
|
||||
case TIMER_REDIRECT:
|
||||
data->progress.t_redirect =
|
||||
(double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue