From: Elan Ruusamäe Date: Tue, 3 Oct 2017 08:23:53 +0000 (+0300) Subject: fix HTTP/1.1 417 Expectation Failed Bug X-Git-Tag: 4.2.2~1^2 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=433140493eb4f5c832ae4acc0d3ba844c32dd0d1 fix HTTP/1.1 417 Expectation Failed Bug this commonly happens when lighttpd is the backend server --- diff --git a/src/Client.php b/src/Client.php index d31e9f5..8d47208 100644 --- a/src/Client.php +++ b/src/Client.php @@ -873,6 +873,9 @@ class Client $headers[] = $encodingHdr; } + // Fixes the HTTP/1.1 417 Expectation Failed Bug + $headers[] = 'Expect:'; + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); // timeout is borked if ($timeout) {