aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-21 23:00:01 -0800
committerFriendika <info@friendika.com>2010-11-21 23:00:01 -0800
commitde6c777d3f6753b8fb5f33bc0ee8acafc6772551 (patch)
treeef95d120dd770da99071b195fdc08626981cc639 /boot.php
parent552c56102ea70c6c9e32e13675b564a36814a069 (diff)
downloadvolse-hubzilla-de6c777d3f6753b8fb5f33bc0ee8acafc6772551.tar.gz
volse-hubzilla-de6c777d3f6753b8fb5f33bc0ee8acafc6772551.tar.bz2
volse-hubzilla-de6c777d3f6753b8fb5f33bc0ee8acafc6772551.zip
infrastructure for queueing, redelivery
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/boot.php b/boot.php
index f03a5be20..b55c3198b 100644
--- a/boot.php
+++ b/boot.php
@@ -2,7 +2,7 @@
set_time_limit(0);
-define ( 'BUILD_ID', 1018 );
+define ( 'BUILD_ID', 1019 );
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
define ( 'EOL', "<br />\r\n" );
@@ -378,8 +378,7 @@ function fetch_url($url,$binary = false, &$redirects = 0) {
$curl_time = intval(get_config('system','curl_timeout'));
- if($curl_time)
- curl_setopt($ch, CURLOPT_TIMEOUT, $curl_time);
+ curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
// by default we will allow self-signed certs
// but you can override this
@@ -400,7 +399,7 @@ function fetch_url($url,$binary = false, &$redirects = 0) {
$s = curl_exec($ch);
- $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+ $http_code = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
$header = substr($s,0,strpos($s,"\r\n\r\n"));
if(stristr($header,'100') && (strlen($header) < 30)) {
// 100 Continue has two headers, get the real one
@@ -440,8 +439,7 @@ function post_url($url,$params, $headers = null, &$redirects = 0) {
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
$curl_time = intval(get_config('system','curl_timeout'));
- if($curl_time)
- curl_setopt($ch, CURLOPT_TIMEOUT, $curl_time);
+ curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
if(is_array($headers))
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
@@ -459,7 +457,7 @@ function post_url($url,$params, $headers = null, &$redirects = 0) {
$s = curl_exec($ch);
- $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+ $http_code = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
$header = substr($s,0,strpos($s,"\r\n\r\n"));
if(stristr($header,'100') && (strlen($header) < 30)) {
// 100 Continue has two headers, get the real one