From: Marcin Haba Date: Wed, 25 Nov 2015 21:56:33 +0000 (+0100) Subject: baculum: Fix expectation failed error during restore X-Git-Tag: Release-7.4.0~164 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39f6095a31afd719387a8489f8368a1bc702a5de;p=bacula%2Fbacula baculum: Fix expectation failed error during restore --- diff --git a/gui/baculum/protected/Class/API.php b/gui/baculum/protected/Class/API.php index f4528e88e0..47b59f3123 100644 --- a/gui/baculum/protected/Class/API.php +++ b/gui/baculum/protected/Class/API.php @@ -94,7 +94,7 @@ class API extends TModule { $ch = $this->getConnection(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); - curl_setopt($ch, CURLOPT_HTTPHEADER, array($this->getAPIHeader(), 'Accept: application/json', 'X-HTTP-Method-Override: PUT', 'Content-Length: ' . strlen($data))); + curl_setopt($ch, CURLOPT_HTTPHEADER, array($this->getAPIHeader(), 'Accept: application/json', 'X-HTTP-Method-Override: PUT', 'Content-Length: ' . strlen($data), 'Expect:')); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $result = curl_exec($ch); @@ -108,7 +108,7 @@ class API extends TModule { $data = http_build_query(array('create' => $options)); $ch = $this->getConnection(); curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_HTTPHEADER, array($this->getAPIHeader(), 'Accept: application/json')); + curl_setopt($ch, CURLOPT_HTTPHEADER, array($this->getAPIHeader(), 'Accept: application/json', 'Expect:')); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $result = curl_exec($ch);