diff -u -r curl-7.9.1/docs/curl.1 curl-7.9.1.horn/docs/curl.1
--- curl-7.9.1/docs/curl.1	Tue Oct 30 16:38:28 2001
+++ curl-7.9.1.horn/docs/curl.1	Tue Nov 20 14:12:32 2001
@@ -569,6 +569,11 @@
 about to begin. This includes all pre-transfer commands and negotiations that
 are specific to the particular protocol(s) involved.
 .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
+server needs to calculate the result.
+.TP
 .B size_download
 The total amount of bytes that were downloaded.
 .TP
diff -u -r curl-7.9.1/docs/curl_easy_getinfo.3 curl-7.9.1.horn/docs/curl_easy_getinfo.3
--- curl-7.9.1/docs/curl_easy_getinfo.3	Thu May 31 10:41:42 2001
+++ curl-7.9.1.horn/docs/curl_easy_getinfo.3	Tue Nov 20 14:05:43 2001
@@ -52,6 +52,12 @@
 pre-transfer commands and negotiations that are specific to the particular
 protocol(s) involved.
 .TP
+.B CURLINFO_STARTTRANSFER_TIME
+Pass a pointer to a double to receive the time, in seconds, it took from the
+start until the first byte is just about to be transfered. This includes
+CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
+the result.
+.TP
 .B CURLINFO_SIZE_UPLOAD
 Pass a pointer to a double to receive the total amount of bytes that were
 uploaded.
diff -u -r curl-7.9.1/include/curl/curl.h curl-7.9.1.horn/include/curl/curl.h
--- curl-7.9.1/include/curl/curl.h	Sun Nov  4 12:30:51 2001
+++ curl-7.9.1.horn/include/curl/curl.h	Tue Nov 20 12:36:47 2001
@@ -626,7 +626,9 @@
   CURLINFO_CONTENT_LENGTH_DOWNLOAD   = CURLINFO_DOUBLE + 15,
   CURLINFO_CONTENT_LENGTH_UPLOAD     = CURLINFO_DOUBLE + 16,
 
-  CURLINFO_LASTONE          = 17
+  CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
+
+  CURLINFO_LASTONE          = 18
 } CURLINFO;
 
 /* unfortunately, the easy.h include file needs the options and info stuff
Only in curl-7.9.1.horn/lib: .progress.c.swp
diff -u -r curl-7.9.1/lib/getinfo.c curl-7.9.1.horn/lib/getinfo.c
--- curl-7.9.1/lib/getinfo.c	Thu Oct 11 11:35:48 2001
+++ curl-7.9.1.horn/lib/getinfo.c	Tue Nov 20 12:33:04 2001
@@ -43,6 +43,7 @@
   pro->t_nslookup = 0;
   pro->t_connect = 0;
   pro->t_pretransfer = 0;
+  pro->t_starttransfer = 0;
 
   info->httpcode = 0;
   info->httpversion=0;
@@ -106,6 +107,9 @@
     break;
   case CURLINFO_PRETRANSFER_TIME:
     *param_doublep =  data->progress.t_pretransfer;
+    break;
+  case CURLINFO_STARTTRANSFER_TIME:
+    *param_doublep = data->progress.t_starttransfer;
     break;
   case CURLINFO_SIZE_UPLOAD:
     *param_doublep =  data->progress.uploaded;
diff -u -r curl-7.9.1/lib/progress.c curl-7.9.1.horn/lib/progress.c
--- curl-7.9.1/lib/progress.c	Wed Oct 31 15:45:47 2001
+++ curl-7.9.1.horn/lib/progress.c	Tue Nov 20 14:23:43 2001
@@ -111,22 +111,23 @@
     /* mistake filter */
     break;
   case TIMER_STARTSINGLE:
-    /* This is set at the start of a single fetch, there may be several
-       fetches within an operation, why we add all other times relative
-       to this one */
+    /* This is set at the start of a single fetch */
     data->progress.t_startsingle = Curl_tvnow();
     break;
-
   case TIMER_NAMELOOKUP:
-    data->progress.t_nslookup +=
+    data->progress.t_nslookup =
       (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000;
     break;
   case TIMER_CONNECT:
-    data->progress.t_connect +=
+    data->progress.t_connect =
       (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000;
     break;
   case TIMER_PRETRANSFER:
-    data->progress.t_pretransfer +=
+    data->progress.t_pretransfer =
+      (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000;
+    break;
+  case TIMER_STARTTRANSFER:
+    data->progress.t_starttransfer =
       (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000;
     break;
   case TIMER_POSTRANSFER:
@@ -227,7 +228,7 @@
   /* The exact time spent so far (from the start) */
   timespent = (double)Curl_tvdiff (now, data->progress.start)/1000;
 
-  data->progress.timespent = (long)timespent;
+  data->progress.timespent = timespent;
 
   /* The average download speed this far */
   data->progress.dlspeed =
diff -u -r curl-7.9.1/lib/progress.h curl-7.9.1.horn/lib/progress.h
--- curl-7.9.1/lib/progress.h	Fri Aug 31 00:54:02 2001
+++ curl-7.9.1.horn/lib/progress.h	Tue Nov 20 12:21:24 2001
@@ -31,6 +31,7 @@
   TIMER_NAMELOOKUP,
   TIMER_CONNECT,
   TIMER_PRETRANSFER,
+  TIMER_STARTTRANSFER,
   TIMER_POSTRANSFER,
   TIMER_STARTSINGLE,
   TIMER_LAST /* must be last */
diff -u -r curl-7.9.1/lib/transfer.c curl-7.9.1.horn/lib/transfer.c
--- curl-7.9.1/lib/transfer.c	Sat Nov  3 00:09:39 2001
+++ curl-7.9.1.horn/lib/transfer.c	Tue Nov 20 12:29:49 2001
@@ -305,6 +305,8 @@
         }
 	break;
       default:
+        if (bytecount == 0 && writebytecount == 0)
+          Curl_pgrsTime(data, TIMER_STARTTRANSFER);
         if((keepon & KEEP_READ) && FD_ISSET(conn->sockfd, &readfd)) {
           /* read! */
           urg = Curl_read(conn, conn->sockfd, buf, BUFSIZE -1, &nread);
diff -u -r curl-7.9.1/lib/urldata.h curl-7.9.1.horn/lib/urldata.h
--- curl-7.9.1/lib/urldata.h	Sat Nov  3 00:09:40 2001
+++ curl-7.9.1.horn/lib/urldata.h	Tue Nov 20 13:59:10 2001
@@ -374,7 +374,7 @@
   int width; /* screen width at download start */
   int flags; /* see progress.h */
 
-  long timespent;
+  double timespent;
 
   double dlspeed;
   double ulspeed;
@@ -382,6 +382,7 @@
   double t_nslookup;
   double t_connect;
   double t_pretransfer;
+  double t_starttransfer;
 
   struct timeval start;
   struct timeval t_startsingle;
Only in curl-7.9.1/src: hugehelp.c
Only in curl-7.9.1/src: stamp-h2.in
diff -u -r curl-7.9.1/src/writeout.c curl-7.9.1.horn/src/writeout.c
--- curl-7.9.1/src/writeout.c	Tue Aug 14 11:17:21 2001
+++ curl-7.9.1.horn/src/writeout.c	Tue Nov 20 13:37:22 2001
@@ -37,6 +37,7 @@
   VAR_NAMELOOKUP_TIME,
   VAR_CONNECT_TIME,
   VAR_PRETRANSFER_TIME,
+  VAR_STARTTRANSFER_TIME,
   VAR_SIZE_DOWNLOAD,
   VAR_SIZE_UPLOAD,
   VAR_SPEED_DOWNLOAD,
@@ -61,6 +62,7 @@
   {"time_namelookup", VAR_NAMELOOKUP_TIME},
   {"time_connect", VAR_CONNECT_TIME},
   {"time_pretransfer", VAR_PRETRANSFER_TIME},
+  {"time_starttransfer", VAR_STARTTRANSFER_TIME},
   {"size_header", VAR_HEADER_SIZE},
   {"size_request", VAR_REQUEST_SIZE},
   {"size_download", VAR_SIZE_DOWNLOAD},
@@ -136,6 +138,11 @@
               case VAR_PRETRANSFER_TIME:
                 if(CURLE_OK ==
                    curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &doubleinfo))
+                  fprintf(stream, "%.3f", doubleinfo);
+                break;
+              case VAR_STARTTRANSFER_TIME:
+                if(CURLE_OK ==
+                   curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &doubleinfo))
                   fprintf(stream, "%.3f", doubleinfo);
                 break;
               case VAR_SIZE_UPLOAD:
Only in curl-7.9.1: stamp-h1.in

