Skip to content

Commit 917d2e9

Browse files
[HttpClient] workaround bad Content-Length sent by old libcurl
1 parent 5882f85 commit 917d2e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CurlHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function request(string $method, string $url, array $options = []): Respo
245245
if ('POST' !== $method) {
246246
$curlopts[CURLOPT_UPLOAD] = true;
247247
}
248-
} elseif ('' !== $body) {
248+
} elseif ('' !== $body || 'POST' === $method) {
249249
$curlopts[CURLOPT_POSTFIELDS] = $body;
250250
}
251251

0 commit comments

Comments
 (0)