-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Charles wrote:
> Hi,
> 
> In wget 1.10, I observe this behavior:
> 
> If I execute this command
> 
> wget -c somefile
> 
> where somefile is already fully retrieved, but for some reason (buggy
> server), the webserver return a 400 OK HTTP message instead of request
> range not satistied; then wget will redownload the file, sometimes
> producing somefile.1 . So, has there any change to these behavior or
> can this be filed as bug/enhancement?

I'm not sure I understand what it is that you wish Wget to do? (And, I'm
assuming you meant "200 OK"?)

We could have Wget treat 200 OK exactly as 416 Requested Range Not
Satisfiable; but then it won't properly handle servers that legitimately
do not support byte ranges for some or all files.

Wget has no way of knowing that the file had been completely downloaded.
It may have been interrupted, or (as mentioned) byte ranges may not be
available. It has little choice but to redownload.

I suppose at some point in the future, when we have Wget saving download
session data to a specified file, it could record that the file was
successfully retrieved (which is only possible, of course, for files
whose length is known by the server, or which were sent using the
"chunked" Transfer-Encoding), and in that special case treat 200 OK as
416. But we're a long way from recording session data, and it would need
further discussion to determine how appropriate this behavior would be.

- --
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

iD8DBQFHuyo27M8hyUobTrERAi/fAJ41xi81cXgC815paf3vlLVPfcvQ/QCdGd0A
VQwy2gIuMgRMgYHQsQJB/28=
=vHsn
-----END PGP SIGNATURE-----

Reply via email to