[HttpClient] workaround bad Content-Length sent by old libcurl
This commit is contained in:
parent
0222ea5df9
commit
b8d2496979
@ -245,7 +245,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface
|
|||||||
if ('POST' !== $method) {
|
if ('POST' !== $method) {
|
||||||
$curlopts[CURLOPT_UPLOAD] = true;
|
$curlopts[CURLOPT_UPLOAD] = true;
|
||||||
}
|
}
|
||||||
} elseif ('' !== $body) {
|
} elseif ('' !== $body || 'POST' === $method) {
|
||||||
$curlopts[CURLOPT_POSTFIELDS] = $body;
|
$curlopts[CURLOPT_POSTFIELDS] = $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user