mirror of
https://github.com/RetroPie/EmulationStation.git
synced 2024-05-31 18:47:42 -04:00
Merge pull request #865 from cmitu/curl-warning
Handle cURL library deprecation for redirect options
This commit is contained in:
commit
3ed0ac6e83
|
@ -77,7 +77,13 @@ HttpReq::HttpReq(const std::string& url)
|
|||
}
|
||||
|
||||
//set curl restrict redirect protocols
|
||||
//starting with 7.85.0, CURLOPT_REDIR_PROTOCOLS is deprecated
|
||||
// and CURLOPT_REDIR_PROTOCOLS_STR should be used instead
|
||||
#if CURL_AT_LEAST_VERSION(7,85,0)
|
||||
err = curl_easy_setopt(mHandle, CURLOPT_REDIR_PROTOCOLS_STR, "http,https");
|
||||
#else
|
||||
err = curl_easy_setopt(mHandle, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
|
||||
#endif
|
||||
if(err != CURLE_OK)
|
||||
{
|
||||
mStatus = REQ_IO_ERROR;
|
||||
|
|
Loading…
Reference in a new issue