[Owncloud] OC_Util::getUrlContent returns false on https
Максим Минчук
maxim.minchuk at gmail.com
Tue Jul 30 11:01:55 UTC 2013
I use OC_Util::getUrlContent for retrieving data from another server. This
method always return false and i don't know why it happens beacuse method
only returns $data.
Maybe it will be usefull to return an exception if there is error in
response?
Like this:
$data = curl_exec($curl);
if (false === $data){
throw new Exception(curl_error($curl), curl_errno($curl));
}
Or some specific exception type.
Only with this change i understand that i have another problem:
"SSL certificate problem: unable to get local issuer certificate" in
exception, because i have https url.
I need have this in curl options:
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
I don't send any passwords or user data, so i don't need any additional
checks. But i can't change this method, only copy and paste it in my
application.
Maybe some part of this implement in standard OC_Util::getUrlContent,
because only false in response little bit discouraged.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130730/2f4709ef/attachment.html>
More information about the Owncloud
mailing list