]> sjero.net Git - wget/commitdiff
If --content-disposition is used, do not send a HEAD request.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Thu, 3 Jun 2010 14:46:56 +0000 (16:46 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Thu, 3 Jun 2010 14:46:56 +0000 (16:46 +0200)
NEWS
src/ChangeLog
src/http.c

diff --git a/NEWS b/NEWS
index e04f27be5e1948fb8d55227ea2580c8d77bb3418..d0026378b7b10a0db6f884a6dec408ef00d7ffed 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,9 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
 ** Cope better with unclosed html tags.
 
 ** Print diagnostic messages to stderr, not stdout.
+
+** Do not use an additional HEAD request when --content-disposition is used,
+   but use directly GET.
 \f
 * Changes in Wget 1.12
 
index 449d24d7f60f5755bbfbbb5844a868124dc25456..edf951399e5ea47774473cd6c2835881160fd3bd 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-03  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * http.c (http_loop): Do not send a HEAD request before the GET request
+       when --content-disposition is used.
+       Reported by: alex_wh@mail.ru.
+
 2010-05-31  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * css.l: Use option "nounput".
index 0dfce018b81b66ec1300188a22a2f87efad0ec93..577781cc139b99d003a7812aca19d58550224d10 100644 (file)
@@ -2673,18 +2673,14 @@ File %s already there; not retrieving.\n\n"),
   /* Reset the document type. */
   *dt = 0;
 
-  /* Skip preliminary HEAD request if we're not in spider mode AND
-   * if -O was given or HTTP Content-Disposition support is disabled. */
-  if (!opt.spider
-      && (got_name || !opt.content_disposition))
+  /* Skip preliminary HEAD request if we're not in spider mode.  */
+  if (!opt.spider)
     send_head_first = false;
 
   /* Send preliminary HEAD request if -N is given and we have an existing
    * destination file. */
   file_name = url_file_name (u);
-  if (opt.timestamping
-      && !opt.content_disposition
-      && file_exists_p (file_name))
+  if (opt.timestamping && file_exists_p (file_name))
     send_head_first = true;
   xfree (file_name);