mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Avoid a small buffer when retrieving a file.
This commit is contained in:
parent
cd81370afe
commit
3fb4d068a7
@ -1,5 +1,9 @@
|
|||||||
2011-05-23 Giuseppe Scrivano <gscrivano@gnu.org>
|
2011-05-23 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
|
* retr.c (fd_read_body): Be sure the buffer size is at least 8Kb.
|
||||||
|
BUFSIZ may assume very small values with a negative impact on the
|
||||||
|
performances.
|
||||||
|
|
||||||
* mswindows.h [NEED_GAI_STRERROR]: remove definition for gai_strerror.
|
* mswindows.h [NEED_GAI_STRERROR]: remove definition for gai_strerror.
|
||||||
|
|
||||||
2011-05-15 Ray Satiro <raysatiro@yahoo.com>
|
2011-05-15 Ray Satiro <raysatiro@yahoo.com>
|
||||||
|
@ -208,8 +208,8 @@ fd_read_body (int fd, FILE *out, wgint toread, wgint startpos,
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
int dlbufsize = BUFSIZ;
|
int dlbufsize = max (BUFSIZ, 8 * 1024);
|
||||||
char *dlbuf = xmalloc (BUFSIZ);
|
char *dlbuf = xmalloc (dlbufsize);
|
||||||
|
|
||||||
struct ptimer *timer = NULL;
|
struct ptimer *timer = NULL;
|
||||||
double last_successful_read_tm = 0;
|
double last_successful_read_tm = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user