freebsd-nq/usr.bin/fetch
Dag-Erling Smørgrav a17e51c108 When resuming an HTTP download, we failed to verify that the range
returned by the server matched what we requested, and blindly appended
what we received to what we already had.  This could go two ways: if the
delivered offset was higher than expected, the local file would contain
duplicate data, while if it was lower than expected, there would be data
missing from the middle of the file.  Furthermore, if the transfer was
interrupted again, each subsequent attempt would compound the error.
Fix the first problem by restarting the transfer from scratch if there
is a gap, and the second by explicitly seeking to the correct location
in the local file so as to overwrite any duplicated data.

PR:		bin/117277
Approved by:	re (kib)
MFC after:	3 weeks
2011-09-15 22:50:31 +00:00
..
fetch.1 Add support for HTTP 1.1 If-Modified-Since behavior. 2008-12-15 08:27:44 +00:00
fetch.c When resuming an HTTP download, we failed to verify that the range 2011-09-15 22:50:31 +00:00
Makefile Fixed static linkage. 2010-02-26 09:41:16 +00:00