From fe401688a652c3ee0028d2b51963bd5295652870 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sun, 7 Oct 2012 13:00:43 +0200 Subject: [PATCH] Fix a regression when -c and --content-dispositionn are used together. --- NEWS | 1 + src/ChangeLog | 5 +++++ src/http.c | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index 3635ada3..ce622995 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ Please send GNU Wget bug reports to . ** Support FTP listing for the FTP Server on Windows Server 2008 R2. +** Fix a regression when -c and --content-disposition are used together. * Changes in Wget 1.14 diff --git a/src/ChangeLog b/src/ChangeLog index 069478bb..6fd091c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-10-06 Giuseppe Scrivano + + * http.c (http_loop): Send a HEAD request when -c and + --content-disposition are used together. + 2012-09-29 Merinov Nikolay * ftp-ls.c (ftp_parse_winnt_ls): Support filename extracting with diff --git a/src/http.c b/src/http.c index 02988d20..58884748 100644 --- a/src/http.c +++ b/src/http.c @@ -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); -- 2.39.2