Merge pull request #14071 from owncloud/add_timeout_for_post_requests

add timeout to curl request
This commit is contained in:
Björn Schießle 2015-02-12 11:38:35 +01:00
commit 780024e252
1 changed files with 2 additions and 1 deletions

View File

@ -214,7 +214,8 @@ class HTTPHelper {
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldsString);
curl_setopt($ch, CURLOPT_POSTFIELDS, (string)$fieldsString);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
if (is_readable($certBundle)) {
curl_setopt($ch, CURLOPT_CAINFO, $certBundle);
}