From b8d24969794abc67a79d50ed353fba756250a83b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 26 Sep 2019 21:35:47 +0200 Subject: [PATCH] [HttpClient] workaround bad Content-Length sent by old libcurl --- src/Symfony/Component/HttpClient/CurlHttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/CurlHttpClient.php b/src/Symfony/Component/HttpClient/CurlHttpClient.php index a1d850f94d..3dbd4d2357 100644 --- a/src/Symfony/Component/HttpClient/CurlHttpClient.php +++ b/src/Symfony/Component/HttpClient/CurlHttpClient.php @@ -245,7 +245,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface if ('POST' !== $method) { $curlopts[CURLOPT_UPLOAD] = true; } - } elseif ('' !== $body) { + } elseif ('' !== $body || 'POST' === $method) { $curlopts[CURLOPT_POSTFIELDS] = $body; }