[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#93054: eliminate wait after downloading files

Package: boot-floppies
Version: N/A; 2.2.22-2001-04-02

After downloading rescue.bin, drivers.tgz, and base2_2.tgz from
the network, dbootstrap waits for around two minutes.  That is,
the progress indication screen indicates that the file is
completely downloaded, but the log message indicating that the
file is downloaded does not appear.

I believe that it is waiting for the connection to close, and when
the connection times out it returns and proceeds.  Looking at
busybox wget, it appears that one solution is to send the

 Connection: close

header to encourage the server to close the connection once it
finishes sending.  The following patch implements this.


--- http-fetch.c.orig	Thu Apr  5 14:11:10 2001
+++ http-fetch.c	Thu Apr  5 14:12:05 2001
@@ -321,13 +321,13 @@
   /* changed \n\n to \r\n to better match the spec -randolph */
   if (use_proxy) {
     snprintf (buf, sizeof (buf) - 1,
-	      "GET http://%s:%d/%s/%s HTTP/1.1\r\nHost: %s:%d\r\n",
+	      "GET http://%s:%d/%s/%s HTTP/1.1\r\nHost: %s:%d\r\nConnection: close\r\n",
 	      server_host, server_port, remote_path, remote_filename,
 	      server_host, server_port);
   else {
     snprintf (buf, sizeof (buf) - 1,
-	      "GET /%s/%s HTTP/1.1\r\nHost: %s:%d\r\n",
+	      "GET /%s/%s HTTP/1.1\r\nHost: %s:%d\r\nConnection: close\r\n",
 	      remote_path, remote_filename,
 	      server_host, server_port);

Reply to: