Re: [Feature Request] Use checksum to verify download
Paul Gilmartin via curl-users <[email protected]> Mon, 20 Jan 2025 09:45:33 -0700
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On 1/20/25 09:22, Falk via curl-users wrote:
> I understand that the way checksums must be handled during the download is not compatible with curl's implementation. I've created a prototype to check the API and behavior (https://github.com/falk-werner/fetch) and I've encountered all the things you mentioned: the download must be buffered in a separate file, the checksum must be computed during download, all data must be printed to stdout after successful check and the temporary file must finally be removed.
> .
That's a script you could write. Schematically:
if curl ... | tee temp-file | checksum
then rename temp-file
else delete temp-file
--
gil
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html