]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Fix expectation failed error during restore
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 25 Nov 2015 21:56:33 +0000 (22:56 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Wed, 25 Nov 2015 21:56:33 +0000 (22:56 +0100)
gui/baculum/protected/Class/API.php

index f4528e88e0e63322afbe1ca063ce51d977876769..47b59f3123e7c03075d000db811882f98606f072 100644 (file)
@@ -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);