fix HTTP/1.1 417 Expectation Failed Bug
authorElan Ruusamäe <glen@delfi.ee>
Tue, 3 Oct 2017 08:23:53 +0000 (11:23 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 3 Oct 2017 08:23:57 +0000 (11:23 +0300)
this commonly happens when lighttpd is the backend server

src/Client.php

index d31e9f5..8d47208 100644 (file)
@@ -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) {