+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
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;
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. */