[Gambas-user] gb.net.curl, can't figure out how to get a filesize before download

Bruce Steers bsteers4 at gmail.com
Mon Feb 1 19:23:19 CET 2021


Hi all.
I got yet another Gambas upgrader on the way.

Differences are this one does not use git or any other external commands
outside of the gambas compile/install process. (oh except unzip as
gb.compress only does single files not archives)

Also it deals with no other branch/fork than the main gambas master or
stable.
Branch is manually selected as master or stable and gb.net.curl is used to
download the archive, then unzip is used to extract the source folder.

Planned to be the "Simple" upgrader , no git fancy stuff. just download the
whole archive , install dependencies and then compile/install.

I've hit a problem trying to do what i suspect is simple when you know how.

I've figured out how to use HttpClient to start downloading the gambas zip
and save the file reporting the bytes download as it does.

But i tried reading the .Headers and other things to find the file size
before downloading but cannot find anything like "content-length" or
anything that looks like a file size where i get a list of headers.

Is there any simple way to get the downloads total file size before or even
during the download?

Thanks for any help :)
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210201/5fe416b8/attachment.htm>


More information about the User mailing list