From 71fb70116891920a71eeaa9daac7f54294e8caf7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 6 Nov 2000 15:31:10 +0000 Subject: adjusted the time-keeping function to work better for location following requests --- lib/highlevel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/highlevel.c') diff --git a/lib/highlevel.c b/lib/highlevel.c index 7a9dad308..a67e0f024 100644 --- a/lib/highlevel.c +++ b/lib/highlevel.c @@ -625,6 +625,7 @@ CURLcode curl_transfer(CURL *curl) pgrsStartNow(data); do { + pgrsTime(data, TIMER_STARTSINGLE); res = curl_connect(curl, (CURLconnect **)&c_connect); if(res == CURLE_OK) { res = curl_do(c_connect); @@ -635,13 +636,18 @@ CURLcode curl_transfer(CURL *curl) } if((res == CURLE_OK) && data->newurl) { - /* Location: redirect */ + /* Location: redirect + + This is assumed to happen for HTTP(S) only! + */ char prot[16]; char path[URL_MAX_LENGTH]; /* mark the next request as a followed location: */ data->bits.this_is_a_follow = TRUE; + data->proto.http->followlocation++; /* count location-followers */ + if(data->bits.http_auto_referer) { /* We are asked to automatically set the previous URL as the referer when we get the next URL. We pick the ->url field, -- cgit v1.2.3