mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-27 15:47:30 -04:00
FeedReader: Fixed embedding of images with https
This commit is contained in:
parent
2baec2baab
commit
c90ea518c5
2 changed files with 4 additions and 3 deletions
|
@ -196,7 +196,7 @@ static std::string getBaseLink(std::string link)
|
||||||
|
|
||||||
static std::string calculateLink(const std::string &baseLink, const std::string &link)
|
static std::string calculateLink(const std::string &baseLink, const std::string &link)
|
||||||
{
|
{
|
||||||
if (link.substr(0, 7) == "http://") {
|
if (link.substr(0, 7) == "http://" || link.substr(0, 8) == "https://") {
|
||||||
/* absolute link */
|
/* absolute link */
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
|
@ -204,8 +204,8 @@ static std::string calculateLink(const std::string &baseLink, const std::string
|
||||||
/* calculate link of base link */
|
/* calculate link of base link */
|
||||||
std::string resultLink = baseLink;
|
std::string resultLink = baseLink;
|
||||||
|
|
||||||
/* link should begin with "http://" */
|
/* link should begin with "http://" or "https://" */
|
||||||
if (resultLink.substr(0, 7) != "http://") {
|
if (resultLink.substr(0, 7) != "http://" || resultLink.substr(0, 8) != "https://") {
|
||||||
resultLink.insert(0, "http://");
|
resultLink.insert(0, "http://");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ CURLcode CURLWrapper::downloadBinary(const std::string &link, std::vector<unsign
|
||||||
curl_easy_setopt(mCurl, CURLOPT_URL, link.c_str());
|
curl_easy_setopt(mCurl, CURLOPT_URL, link.c_str());
|
||||||
curl_easy_setopt(mCurl, CURLOPT_WRITEFUNCTION, writeFunctionBinary);
|
curl_easy_setopt(mCurl, CURLOPT_WRITEFUNCTION, writeFunctionBinary);
|
||||||
curl_easy_setopt(mCurl, CURLOPT_WRITEDATA, &data);
|
curl_easy_setopt(mCurl, CURLOPT_WRITEDATA, &data);
|
||||||
|
curl_easy_setopt(mCurl, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
|
||||||
return curl_easy_perform(mCurl);
|
return curl_easy_perform(mCurl);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue