HomeFreeBSD

When resuming an HTTP download, we failed to verify that the range
rS225599Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

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

Details

Provenance
desAuthored on
Parents
rS225598: IFC @ r225592
Branches
Unknown
Tags
Unknown

Event Timeline