Skip to content
Permalink
Browse files

fix(curl): suppress "Transfer-Encoding: chunked" added by last versio…

…n of curl (#96)
  • Loading branch information...
mremi authored and robocoder committed Sep 20, 2019
1 parent a1112fb commit 36cd92de31fa9a0795dedf2317696bcbeafbccc7
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/WebDriver/Service/CurlService.php
@@ -69,6 +69,10 @@ public function execute($requestMethod, $url, $parameters = null, $extraOptions
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($parameters));
} else {
$customHeaders[] = 'Content-Length: 0';
// Suppress "Transfer-Encoding: chunked" header automatically added by cURL that
// causes a 400 bad request (bad content-length).
$customHeaders[] = 'Transfer-Encoding:';
}
// Suppress "Expect: 100-continue" header automatically added by cURL that
@@ -87,6 +91,10 @@ public function execute($requestMethod, $url, $parameters = null, $extraOptions
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($parameters));
} else {
$customHeaders[] = 'Content-Length: 0';
// Suppress "Transfer-Encoding: chunked" header automatically added by cURL that
// causes a 400 bad request (bad content-length).
$customHeaders[] = 'Transfer-Encoding:';
}
// Suppress "Expect: 100-continue" header automatically added by cURL that

0 comments on commit 36cd92d

Please sign in to comment.
You can’t perform that action at this time.