curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: [Feature Request] Use checksum to verify download

From: Paul Gilmartin via curl-users <curl-users_at_lists.haxx.se>
Date: Mon, 20 Jan 2025 09:45:33 -0700

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
Received on 2025-01-20