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:
parent
9adc7cf275
commit
5114df6b33
@ -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>
|
2004-02-06 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* connect.c (sockaddr_set_data): Zero out
|
* connect.c (sockaddr_set_data): Zero out
|
||||||
|
@ -1057,7 +1057,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
int keep_alive;
|
int keep_alive;
|
||||||
|
|
||||||
/* Whether keep-alive should be inhibited. */
|
/* 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. */
|
/* Headers sent when using POST. */
|
||||||
long post_data_size = 0;
|
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, " ");
|
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);
|
contlen = strtol (hdrval, NULL, 10);
|
||||||
|
|
||||||
/* Check for keep-alive related responses. */
|
/* Check for keep-alive related responses. */
|
||||||
|
Loading…
Reference in New Issue
Block a user