mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
revert web
This commit is contained in:
parent
fc58ab79ef
commit
90d55d0526
1 changed files with 1 additions and 14 deletions
|
@ -214,8 +214,6 @@ SentAsyncWebRequest::Impl::Impl(SentAsyncWebRequest* self, AsyncWebRequest const
|
||||||
return this->error("Curl not initialized", -1);
|
return this->error("Curl not initialized", -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
log::debug("curl init {}", curl);
|
|
||||||
|
|
||||||
// resulting byte array
|
// resulting byte array
|
||||||
ByteVector ret;
|
ByteVector ret;
|
||||||
// output file if downloading to file. unique_ptr because not always
|
// output file if downloading to file. unique_ptr because not always
|
||||||
|
@ -308,28 +306,17 @@ SentAsyncWebRequest::Impl::Impl(SentAsyncWebRequest* self, AsyncWebRequest const
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
|
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
|
||||||
log::debug("curl opts");
|
|
||||||
auto res = curl_easy_perform(curl);
|
auto res = curl_easy_perform(curl);
|
||||||
log::debug("curl perform");
|
|
||||||
|
|
||||||
if (res != CURLE_OK) {
|
if (res != CURLE_OK) {
|
||||||
long code = 0;
|
long code = 0;
|
||||||
log::debug("curl fail");
|
|
||||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
|
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
|
||||||
log::debug("curl cleanup");
|
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
log::debug("end");
|
|
||||||
return this->error("Fetch failed: " + std::string(curl_easy_strerror(res)), code);
|
return this->error("Fetch failed: " + std::string(curl_easy_strerror(res)), code);
|
||||||
}
|
}
|
||||||
log::debug("curl cleanup 2");
|
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
|
|
||||||
log::debug("end 2");
|
|
||||||
|
|
||||||
AWAIT_RESUME();
|
AWAIT_RESUME();
|
||||||
|
|
||||||
log::debug("end 3");
|
|
||||||
|
|
||||||
// if something is still holding a handle to this
|
// if something is still holding a handle to this
|
||||||
// request, then they may still cancel it
|
// request, then they may still cancel it
|
||||||
m_finished = true;
|
m_finished = true;
|
||||||
|
@ -595,4 +582,4 @@ AsyncWebResult<json::Value> AsyncWebResponse::json() {
|
||||||
return Err(std::string(e.what()));
|
return Err(std::string(e.what()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in a new issue