1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Respect --ignore-length.

Inhibit keep-alive when --ignore-length is used.
This commit is contained in:
hniksic 2004-02-06 17:48:54 -08:00
parent 9adc7cf275
commit 5114df6b33
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2004-02-06 Hrvoje Niksic <hniksic@xemacs.org>
* http.c (gethttp): Respect --ignore-length.
(gethttp): Inhibit keep-alive if --ignore-length is specified.
2004-02-06 Hrvoje Niksic <hniksic@xemacs.org>
* connect.c (sockaddr_set_data): Zero out

View File

@ -1057,7 +1057,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
int keep_alive;
/* Whether keep-alive should be inhibited. */
int inhibit_keep_alive = !opt.http_keep_alive;
int inhibit_keep_alive = !opt.http_keep_alive || opt.ignore_length;
/* Headers sent when using POST. */
long post_data_size = 0;
@ -1455,7 +1455,8 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
print_server_response (resp, " ");
}
if (response_header_copy (resp, "Content-Length", hdrval, sizeof (hdrval)))
if (!opt.ignore_length
&& response_header_copy (resp, "Content-Length", hdrval, sizeof (hdrval)))
contlen = strtol (hdrval, NULL, 10);
/* Check for keep-alive related responses. */