summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-12-20 14:59:46 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-12-20 14:59:46 +0100
commitce896875f89f66d8d1659d57e6d6f80c157c1071 (patch)
tree07e608add7cc2a699570fe271e8d73a73f7edca9 /lib/url.c
parenteb6e9593c4153ca122c2eba32fde1c2319a14db7 (diff)
downloadcurl-ce896875f89f66d8d1659d57e6d6f80c157c1071.tar.gz
timer: restore PRETRANSFER timing
Regression introduced in 7.23.0 with commit 9dd85bce. The function in which the PRETRANSFER time stamp was recorded was moved in time causing it be stored very quickly after the start timestamp. On most systems shorter than 1 millisecond and thus it wouldn't even show with -w "%{time_pretransfer}" using the command line tool. Bug: http://curl.haxx.se/mail/archive-2011-12/0022.html Reported by: Toni Moreno
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index b0ec7c41f..a4aadb28d 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5390,7 +5390,6 @@ static CURLcode do_init(struct connectdata *conn)
k->hbufp = data->state.headerbuff;
k->ignorebody=FALSE;
- Curl_pgrsTime(data, TIMER_PRETRANSFER);
Curl_speedinit(data);
Curl_pgrsSetUploadCounter(data, 0);
@@ -5410,6 +5409,7 @@ static void do_complete(struct connectdata *conn)
conn->data->req.chunk=FALSE;
conn->data->req.maxfd = (conn->sockfd>conn->writesockfd?
conn->sockfd:conn->writesockfd)+1;
+ Curl_pgrsTime(conn->data, TIMER_PRETRANSFER);
}
CURLcode Curl_do(struct connectdata **connp, bool *done)