Re: Curl feature idea, download hash checking
bruce via curl-users <[email protected]> Sat, 13 Jun 2026 14:56:46 -0400
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <CAP16ngqaOyNvD9+1TeuntKDehRRKfHAau2wy4HUHp8dLDfo7TQ@mail.gmail.com> |
--===============6724227080648217543== Content-Type: multipart/alternative; boundary="00000000000077a3890654272821" --00000000000077a3890654272821 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable as i recall decade ago. that was the mantra!. so maybe a few example of how to accomplish this kind of process would be enough!! On Sat, Jun 13, 2026, 9:25=E2=80=AFAM Ray Satiro via curl-users < [email protected]> wrote: > On 6/12/2026 7:16 AM, Daniel Stenberg via curl-users wrote: > > On Fri, 12 Jun 2026, Ian Norton via curl-users wrote: > > curl -O URL =E2=80=94-hash sha256:HASH_VALUE=E2=80=8B > > Does this sound like a good idea? > > > It is an idea that is often brought up but has never been materialized. I= s > it good? I think it depends on how it is done so that in the end people > would use it. > > > Many years ago I wrote CURLOPT_SHA256 / CURLINFO_SHA256 to calculate the > hash of the transfer body as received but there wasn't any interest so it > wasn't adopted see https://github.com/curl/curl/issues/1399 > > These days sha256 is more common and we have sha256 calculation code > already in libcurl. So that part would be easier. But to handle partially > downloaded data, resumed data, etc, is still a complication. You can > already pipe curl to sha256 for verification, and ghedo gives an example = in > that issue of how to do it. > > Basically if you can do the unix pipe style to an existing tool that can > handle it then is it worth putting that tool's functionality in curl, I > guess is the question. What I mean is like grep should be grep, curl shou= ld > be curl etc > -- > Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users > Etiquette: https://curl.se/mail/etiquette.html > --00000000000077a3890654272821 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">as i recall=C2=A0 decade ago.=C2=A0 that was the mantra!.= =C2=A0 so maybe a few example of how to accomplish this kind of process wou= ld be enough!!<div dir=3D"auto"><br></div><div dir=3D"auto"><br></div></div= ><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" clas= s=3D"gmail_attr">On Sat, Jun 13, 2026, 9:25=E2=80=AFAM Ray Satiro via curl-= users <<a href=3D"mailto:[email protected]">[email protected]= .se</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg= in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u> =20 =20 =20 <div> <div>On 6/12/2026 7:16 AM, Daniel Stenberg via curl-users wrote:<br> </div> <blockquote type=3D"cite">On Fri, 12 Jun 2026, Ian Norton via curl-users wrote: <br> <br> <blockquote type=3D"cite" style=3D"color:#007cff">curl -O URL =E2=80= =94-hash sha256:HASH_VALUE=E2=80=8B <br> <br> Does this sound like a good idea? <br> </blockquote> <br> It is an idea that is often brought up but has never been materialized. Is it good? I think it depends on how it is done so that in the end people would use it. </blockquote> <p><br> </p> <p>Many years ago I wrote CURLOPT_SHA256 / CURLINFO_SHA256 to calculate the hash of the transfer body as received but there wasn't any interest so it wasn't adopted see <a href=3D"https://github.com/curl/curl/issues/1399" target=3D"_blank= " rel=3D"noreferrer">https://github.com/curl/curl/issues/1399</a></p> <p>These days sha256 is more common and we have sha256 calculation code already in libcurl. So that part would be easier. But to handle partially downloaded data, resumed data, etc, is still a complication. You can already pipe curl to sha256 for verification, and ghedo gives an example in that issue of how to do it.</p> <p>Basically if you can do the unix pipe style to an existing tool that can handle it then is it worth putting that tool's functionality in curl, I guess is the question. What I mean is like grep should be grep, curl should be curl etc<br> </p> </div> -- <br> Unsubscribe: <a href=3D"https://lists.haxx.se/mailman/listinfo/curl-users" = rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.haxx.se/mailm= an/listinfo/curl-users</a><br> Etiquette:=C2=A0 =C2=A0<a href=3D"https://curl.se/mail/etiquette.html" rel= =3D"noreferrer noreferrer" target=3D"_blank">https://curl.se/mail/etiquette= .html</a><br> </blockquote></div> --00000000000077a3890654272821-- --===============6724227080648217543== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html --===============6724227080648217543==--