Browse code

freshclam: use HTTP Range

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@436 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/03/25 20:09:45
Showing 3 changed files
... ...
@@ -63,6 +63,7 @@ Michael Dankov <misha*btrc.ru>
63 63
 Alejandro Dubrovsky <s328940*student.uq.edu.au>
64 64
 Magnus Ekdahl <magnus*debian.org>
65 65
 Jason Englander <jason*englanders.cc>
66
+Tony Finch <dot*dotat.at>
66 67
 David Ford <david+cert*blue-labs.org>
67 68
 Michel Gaudet <Michel.Gaudet*ehess.fr>
68 69
 Philippe Gay <ph.gay*free.fr>
... ...
@@ -1,3 +1,8 @@
1
+Thu Mar 25 12:20:05 CET 2004 (tk)
2
+---------------------------------
3
+  * freshclam: use HTTP Range to limit data transfer for cvd headers
4
+	       (patch by Tony Finch <dot*dotat.at>)
5
+
1 6
 Wed Mar 24 09:19:12 GMT 2004 (njh)
2 7
 ----------------------------------
3 8
   * libclamav/blob.c:	Reduce the number of calls to cli_realloc, since realloc
... ...
@@ -379,14 +379,16 @@ struct cl_cvd *remote_cvdhead(const char *file, int socketfd, const char *hostna
379 379
 	"User-Agent: "PACKAGE"/"VERSION"\r\n"
380 380
 	"Cache-Control: no-cache\r\n"
381 381
 	"Connection: close\r\n"
382
+	"Range: bytes=0-511\r\n"
382 383
 	"\r\n", (remotename != NULL)?remotename:"", file, hostname, (authorization != NULL)?authorization:"");
383 384
 #else
384 385
     snprintf(cmd, sizeof(cmd), "GET %s/%s HTTP/1.1\r\n"
385
-	     "Host: %s\r\n%s"
386
-	     "User-Agent: "PACKAGE"/"VERSION"\r\n"
387
-	     "Cache-Control: no-cache\r\n"
388
-	     "Connection: close\r\n"
389
-	     "\r\n", (remotename != NULL)?remotename:"", file, hostname, (authorization != NULL)?authorization:"");
386
+	"Host: %s\r\n%s"
387
+	"User-Agent: "PACKAGE"/"VERSION"\r\n"
388
+	"Cache-Control: no-cache\r\n"
389
+	"Connection: close\r\n"
390
+	"Range: bytes=0-511\r\n"
391
+	"\r\n", (remotename != NULL)?remotename:"", file, hostname, (authorization != NULL)?authorization:"");
390 392
 #endif
391 393
     write(socketfd, cmd, strlen(cmd));
392 394