]> sjero.net Git - wget/commitdiff
Fix a regression when -c and --content-dispositionn are used together.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 7 Oct 2012 11:00:43 +0000 (13:00 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 7 Oct 2012 11:00:46 +0000 (13:00 +0200)
NEWS
src/ChangeLog
src/http.c

diff --git a/NEWS b/NEWS
index 3635ada33c6dfe2529af738de549d2542fd92998..ce6229957df67915565b90ac5a9f77309a9a6cc9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
 
 ** Support FTP listing for the FTP Server on Windows Server 2008 R2.
 
+** Fix a regression when -c and --content-disposition are used together.
 \f
 * Changes in Wget 1.14
 
index 069478bb01562f615d5b1a23d32a0f5a53448cd3..6fd091c25bcfc65bb0196fa921cdc7d66dd48682 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-06  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * http.c (http_loop): Send a HEAD request when -c and
+       --content-disposition are used together.
+
 2012-09-29 Merinov Nikolay <kim.roader@gmail.com>
 
        * ftp-ls.c (ftp_parse_winnt_ls): Support filename extracting with
index 02988d20185c1b7316b026d0b05b7049434ca6f8..588847486a5ea93dfe8adafed682663bbd59265f 100644 (file)
@@ -3004,6 +3004,11 @@ http_loop (struct url *u, struct url *original_url, char **newloc,
   if (!opt.spider)
     send_head_first = false;
 
+  /* Send preliminary HEAD request if --content-disposition and -c are used
+     together.  */
+  if (opt.content_disposition && opt.always_rest)
+    send_head_first = true;
+
   /* Send preliminary HEAD request if -N is given and we have an existing
    * destination file. */
   file_name = url_file_name (opt.trustservernames ? u : original_url, NULL);