Fix the download fail issue on the normal environment 63/287863/1
authorpyun <dh79.pyun@samsung.com>
Tue, 7 Feb 2023 05:55:14 +0000 (14:55 +0900)
committerpyun <dh79.pyun@samsung.com>
Tue, 7 Feb 2023 07:26:25 +0000 (16:26 +0900)
Change-Id: Ib6ddcbe831dad72e5188f44a598cb3bd5d847bd8
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
agent/download-agent-plugin-libcurl.c
packaging/download-provider.spec

index b1a5398..5a58df1 100755 (executable)
@@ -179,12 +179,14 @@ void __store_header(void *msg, da_info_t *da_info, size_t header_size,
                CURL *curl;
                http_raw_data_t *raw_data = DA_NULL;
                curl = http_info->http_msg->curl;
-               if (http_info->proxy_info) {
-                       DA_LOGI("Proxy is set.");
-                       res = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &status);
-               } else {
+
                res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
-               }
+
+                if (res != CURLE_OK && http_info->proxy_info) {
+                        DA_LOGI("Proxy is set.");
+                        res = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &status);
+                }
+
                if (res != CURLE_OK) {
                        DA_LOGE("Fail to get response status code");
                        return;
index 8503c2c..4a76322 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       download-provider
 Summary:    Download the contents in background
-Version:    2.3.4
+Version:    2.3.5
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0