From 117c25970b830538b4b869a23e61316198cd3f7c Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 14 Jun 2010 19:24:47 +0200 Subject: [PATCH] Send a HEAD before the GET when -N and --content-disposition are used together. --- src/ChangeLog | 6 ++++++ src/http.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index c1a1a894..84cdfc2e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-06-14 Giuseppe Scrivano + + * http.c (http_loop): Always send a HEAD request when -N is used + together with --content-disposition. + Reported by: Jochen Roderburg . + 2010-06-10 Muthu Subramanian K (tiny change) * http.c (http_loop): Increase `total_downloaded_bytes' by diff --git a/src/http.c b/src/http.c index c3ec2e0d..ace3bfe5 100644 --- a/src/http.c +++ b/src/http.c @@ -2680,7 +2680,8 @@ File %s already there; not retrieving.\n\n"), /* Send preliminary HEAD request if -N is given and we have an existing * destination file. */ file_name = url_file_name (u); - if (opt.timestamping && file_exists_p (file_name)) + if (opt.timestamping && (file_exists_p (file_name) + || opt.content_disposition)) send_head_first = true; xfree (file_name); -- 2.39.2