Hi dear all,
I'm reading the code of QT attached http sample(examples\network\http).
In HttpWindow::downloadFile(), I added a key&value pair to the
QHttpRequestHeader, like this:
httpRequestAborted = false;
header.setValue("Range", "bytes=0-1024");
httpGetId = http->get(url.path(), file);
httpRequestAborted = false;
QHttpRequestHeader header = http->currentRequest();
header.setValue("Range", "bytes=0-1024");
httpGetId = http->get(url.path(), file);
To copy to clipboard, switch view to plain text mode
It should only return the beginning 1024 bytes, but it returned all of the
document(over 700k). I'm rather confused about this.
It seems that the "Range" does not work.
Please give me some light on this, thanks
Bookmarks