[poppler] poppler/CurlCachedFile.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 1 21:08:02 UTC 2022


 poppler/CurlCachedFile.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5c977b6619b6dbb60da223e38ad601a7bd6b3a26
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Apr 1 23:04:26 2022 +0200

    Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T instead of CURLINFO_CONTENT_LENGTH_DOWNLOAD
    
    As the own curl documetnation says "returns a more sensible variable
    type"

diff --git a/poppler/CurlCachedFile.cc b/poppler/CurlCachedFile.cc
index 453c66a3..4ec0e200 100644
--- a/poppler/CurlCachedFile.cc
+++ b/poppler/CurlCachedFile.cc
@@ -36,7 +36,7 @@ static size_t noop_cb(char *ptr, size_t size, size_t nmemb, void *ptr2)
 
 size_t CurlCachedFileLoader::init(CachedFile *cachedFileA)
 {
-    double contentLength = -1;
+    curl_off_t contentLength = -1;
     long code = 0;
     size_t size;
 
@@ -50,7 +50,7 @@ size_t CurlCachedFileLoader::init(CachedFile *cachedFileA)
     curl_easy_perform(curl);
     curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
     if (code) {
-        curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength);
+        curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &contentLength);
         size = contentLength;
     } else {
         error(errInternal, -1, "Failed to get size of '{0:s}'.", url.c_str());


More information about the poppler mailing list