[wget-notify] COMMIT: r2243 - in /branches/bugs/b20323: src/ tests/

Micah Cowan micah at cowan.name
Tue Jul 10 13:30:51 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mauro Tortonesi wrote:
> On Mon, 09 Jul 2007 17:24:12 -0700 Micah Cowan <micah at cowan.name>
> wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>> 
>> mtortonesi at ing.unife.it wrote:
>>> Author: mtortonesi Date: Mon Jul  9 16:28:54 2007 New Revision:
>>> 2243
>>> 
>>> Log: Fix and testcases for bug #20323: skip preliminary HTTP HEAD
>>> request if either -O or --no-content-disposition are given, and
>>> neither --spider and -N are given.
>>> 
>> Is this bug branch also going to address the "don't issue HEAD
>> request if timestamping, and no local file exists" issue, which is
>> what the actual bug report title refers to? :)
> 
> of course. in fact, http.c contains the fix. it's just 3-4 lines, but
> it works. as you can guess, i tested it quite a bit ;-)

As far as I can tell, http.c does not contain that fix, and wget still
fails to behave in that way.

In fact, at the moment, it seems that in some cases, HEAD is issued, and
_not_ followed with a GET (so no file is downloaded).

To be clear: the logic should be that HEAD is issued _only_ if all of
the following are true:

  1. We are timestamping, and
  2. Local version of the file exists.

(I'm not _entirely_ sure how --spider enters into this, as I'm not
completely certain of what exactly --spider does).

The current logic, after your fix, seems to be _always_ issue HEAD,
unless _any_ of the following are true:

  1. We're spidering
  2. We're timestamping
  3. We've not "got name"

Note that opt.content_disposition, despite _looking_ like it enters in,
doesn't in fact, as the value of the test (send_head_first && !got_name)
is equivalent to (!(got_name || !opt.content_disposition) && !got_name),
and is therefore completely dominated by the value of got_name.

Specific observed behaviors of this code that do not behave as desired are:

$ wget www.gnu.org/home.html
Issues HEAD, followed by GET

$ wget -N www.gnu.org/home.html  # when no home.html is present
Issues HEAD, followed by GET

The latter of the above two is the specific behavior requested to change
by bug 20323.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGk+x77M8hyUobTrERCEyPAJ4t+Rg6MmeK1Ze3MyRMyzuzZ+royACfW7hm
jdX7PfrRtDUhsJGkTbjF2r8=
=PPla
-----END PGP SIGNATURE-----


More information about the wget-notify mailing list