CURL *curl;
http_raw_data_t *raw_data = DA_NULL;
curl = http_info->http_msg->curl;
- if (http_info->proxy_info) {
+
+ res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
+ if (status == 0 && 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);
}
+
+ DA_LOGI("status code[%d]", (int)status);
+
if (res != CURLE_OK) {
DA_LOGE("Fail to get response status code");
return;
}
- DA_LOGI("status code[%d]", (int)status);
+
if (http_info->http_msg_response)
http_info->http_msg_response->status_code = (int)status;
raw_data = (http_raw_data_t *)calloc(1, sizeof(http_raw_data_t));