[HttpClient] workaround bad Content-Length sent by old libcurl

This commit is contained in:
Nicolas Grekas 2019-09-26 21:35:47 +02:00
parent 0222ea5df9
commit b8d2496979

View File

@ -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;
}