Send a HEAD request to the server, it will reply with the same header (but no body) as if you sent GET. In this header, you will receive Content-length which will be the size of the file as long as you do not include a "Range" header in your HEAD request (else you'll get the size of your range, which isn't what you want).
Note that not all servers support this, in which case you will be transferring "blind" and will have to depend on a short read.
yes, I also think it will get by, but really I do not known write in QTcreator how to get respond Http header, I havent example by learn
Bookmarks