diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-03 17:49:58 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-05 08:51:29 +0100 |
commit | 9b5a18179e4d7f3483948fd24b1c4dcb28608a80 (patch) | |
tree | bd90b690dbac72a872fd5067e367b616fb4ffefc /src/core/net/url_request_custom_job_proxy.cpp | |
parent | 795d5e2666cababe4fbf8533d8a49fdc40d8d4c1 (diff) |
Improve custom scheme http content-range support
Also parse length, and report back part expected HTTP headers.
Change-Id: I414ef6fb6ade601f59a23c01bb547d58f0f7ffd1
Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu>
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/net/url_request_custom_job_proxy.cpp')
-rw-r--r-- | src/core/net/url_request_custom_job_proxy.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/net/url_request_custom_job_proxy.cpp b/src/core/net/url_request_custom_job_proxy.cpp index d2df64f2f..f734db645 100644 --- a/src/core/net/url_request_custom_job_proxy.cpp +++ b/src/core/net/url_request_custom_job_proxy.cpp @@ -100,9 +100,8 @@ void URLRequestCustomJobProxy::reply(std::string mimeType, QIODevice *device) m_client->m_device->seek(m_client->m_firstBytePosition); qint64 deviceSize = m_client->m_device ? m_client->m_device->size() : -1; - qint64 remainingBytes = deviceSize - m_client->m_firstBytePosition; - if (remainingBytes > 0) - m_client->notifyExpectedContentSize(remainingBytes); + if (deviceSize > 0) + m_client->notifyExpectedContentSize(deviceSize); if (m_client->m_device && m_client->m_device->isReadable()) { m_started = true; |