aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-04 15:42:51 -0700
committerFriendika <info@friendika.com>2011-07-04 15:42:51 -0700
commit300f59ff3e8bc56e8a17cb30c915fcd8ec2c8877 (patch)
treeb16e20d24354a0b6106257516a60410e51c1f204
parent78363ecfb10edb29da9394770b68bb66f199e70b (diff)
parentf164a6314426915b0badc5dd4b067322eb1e7e32 (diff)
downloadvolse-hubzilla-300f59ff3e8bc56e8a17cb30c915fcd8ec2c8877.tar.gz
volse-hubzilla-300f59ff3e8bc56e8a17cb30c915fcd8ec2c8877.tar.bz2
volse-hubzilla-300f59ff3e8bc56e8a17cb30c915fcd8ec2c8877.zip
Merge pull request #134 from defel/fix-HTTP417-lighttpd-1.4.19-bug2
require 'Expect' http-header for non-apache webserver (like lighttpd)
-rw-r--r--boot.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 855a67dfd..73e16f7e8 100644
--- a/boot.php
+++ b/boot.php
@@ -756,8 +756,15 @@ function post_url($url,$params, $headers = null, &$redirects = 0) {
$curl_time = intval(get_config('system','curl_timeout'));
curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
- if(is_array($headers))
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+ if(!is_array($headers)) {
+ $headers = array('Expect:');
+ } else {
+ if(!in_array('Expect:', $headers)) {
+ array_push($headers, 'Expect:');
+ }
+ }
+
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$check_cert = get_config('system','verifyssl');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));