Merge pull request #134 from defel/fix-HTTP417-lighttpd-1.4.19-bug2
require 'Expect' http-header for non-apache webserver (like lighttpd)
This commit is contained in:
commit
300f59ff3e
9
boot.php
9
boot.php
|
@ -756,7 +756,14 @@ 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))
|
||||
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');
|
||||
|
|
Loading…
Reference in a new issue