freshclam: use HTTP Range

git-svn: trunk@436
remotes/push_mirror/metadata
Tomasz Kojm 21 years ago
parent d3aa15b80d
commit 12aa87463a
  1. 1
      clamav-devel/AUTHORS
  2. 5
      clamav-devel/ChangeLog
  3. 12
      clamav-devel/freshclam/manager.c

@ -63,6 +63,7 @@ Michael Dankov <misha*btrc.ru>
Alejandro Dubrovsky <s328940*student.uq.edu.au>
Magnus Ekdahl <magnus*debian.org>
Jason Englander <jason*englanders.cc>
Tony Finch <dot*dotat.at>
David Ford <david+cert*blue-labs.org>
Michel Gaudet <Michel.Gaudet*ehess.fr>
Philippe Gay <ph.gay*free.fr>

@ -1,3 +1,8 @@
Thu Mar 25 12:20:05 CET 2004 (tk)
---------------------------------
* freshclam: use HTTP Range to limit data transfer for cvd headers
(patch by Tony Finch <dot*dotat.at>)
Wed Mar 24 09:19:12 GMT 2004 (njh)
----------------------------------
* 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
"User-Agent: "PACKAGE"/"VERSION"\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
"Range: bytes=0-511\r\n"
"\r\n", (remotename != NULL)?remotename:"", file, hostname, (authorization != NULL)?authorization:"");
#else
snprintf(cmd, sizeof(cmd), "GET %s/%s HTTP/1.1\r\n"
"Host: %s\r\n%s"
"User-Agent: "PACKAGE"/"VERSION"\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
"\r\n", (remotename != NULL)?remotename:"", file, hostname, (authorization != NULL)?authorization:"");
"Host: %s\r\n%s"
"User-Agent: "PACKAGE"/"VERSION"\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
"Range: bytes=0-511\r\n"
"\r\n", (remotename != NULL)?remotename:"", file, hostname, (authorization != NULL)?authorization:"");
#endif
write(socketfd, cmd, strlen(cmd));

Loading…
Cancel
Save