From 43d036e72488b4be5f48aaec9278a55dc22cb556 Mon Sep 17 00:00:00 2001 From: Ryan Winograd Date: Wed, 21 Jun 2017 12:15:46 -0500 Subject: progress: Track total times following redirects Update the progress timers `t_nslookup`, `t_connect`, `t_appconnect`, `t_pretransfer`, and `t_starttransfer` to track the total times for these activities when a redirect is followed. Previously, only the times for the most recent request would be tracked. Related changes: - Rename `Curl_pgrsResetTimesSizes` to `Curl_pgrsResetTransferSizes` now that the function only resets transfer sizes and no longer modifies any of the progress timers. - Add a bool to the `Progress` struct that is used to prevent double-counting `t_starttransfer` times. Added test case 1399. Fixes #522 and Known Bug 1.8 Closes #1602 Reported-by: joshhe on github --- lib/transfer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/transfer.c') diff --git a/lib/transfer.c b/lib/transfer.c index 3537b58c6..e7625ef77 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1345,7 +1345,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) #endif Curl_initinfo(data); /* reset session-specific information "variables" */ - Curl_pgrsResetTimesSizes(data); + Curl_pgrsResetTransferSizes(data); Curl_pgrsStartNow(data); if(data->set.timeout) @@ -1883,7 +1883,7 @@ CURLcode Curl_follow(struct Curl_easy *data, break; } Curl_pgrsTime(data, TIMER_REDIRECT); - Curl_pgrsResetTimesSizes(data); + Curl_pgrsResetTransferSizes(data); return CURLE_OK; #endif /* CURL_DISABLE_HTTP */ -- cgit v1.2.3