1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Don't abort when len > contlen, when we set it that way.

This commit is contained in:
Micah Cowan 2008-06-16 21:49:15 -07:00
parent fe6ab90c73
commit c94d559bc3
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-06-16 Micah Cowan <micah@cowan.name>
* http.c (http_loop): When hstat.len is higher than the
successfully completed content's length, but it's because we
_set_ it that way, don't abort.
2008-06-13 Micah Cowan <micah@cowan.name>
* build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL

View File

@ -2800,10 +2800,18 @@ Remote file exists.\n\n"));
printwhat (count, opt.ntry);
continue;
}
else
else if (hstat.len != hstat.restval)
/* Getting here would mean reading more data than
requested with content-length, which we never do. */
abort ();
else
{
/* Getting here probably means that the content-length was
* _less_ than the original, local size. We should probably
* truncate or re-read, or something. FIXME */
ret = RETROK;
goto exit;
}
}
else /* from now on hstat.res can only be -1 */
{