bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] bug wget -c --content-disposition


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] bug wget -c --content-disposition
Date: Sat, 06 Oct 2012 16:01:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

could you please try if the attached patch (untested) fix it for you?
I don't think we want to send an additional HEAD request if -c is not
specified.

diff --git a/src/http.c b/src/http.c
index 02988d2..5888474 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);



Giuseppe


Alex <address@hidden> writes:

> Greetings, Andriansah
> Hope that find what patch look like need to reverse (But this was changed 
> after bug-report. Why? Can't find this in mail archive. And very-very low 
> knowlege to understood by myself. I'm only a usual user...). Send ask to 
> Micah Cowan to check. Now wait...
> Please can You check it by youself (this is for 1.14 realease)?
> [code]
> --- http.c.old        2012-07-07 08:57:20 +0000
> +++ http.c    2012-09-01 20:22:56 +0000
> @@ -2999,7 +2999,7 @@
>    *dt = 0;
>
>    /* Skip preliminary HEAD request if we're not in spider mode.  */
> -  if (!opt.spider)
> +  if (!opt.spider && got_name ||!opt.content_disposition)
>      send_head_first = false;
>
>    /* Send preliminary HEAD request if -N is given and we have an existing
> [/code]
> Data about original patch :
> revno: 2377
> committer: Giuseppe Scrivano <address@hidden>
> branch nick: wget
> timestamp: Thu 2010-06-03 16:46:56 +0200
> message: If --content-disposition is used, do not send a HEAD request. 
> Reported by: address@hidden
>
> Sorry for bad English.
>
> Best regars, Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]