10000 bug #33727 [HttpClient] workaround bad Content-Length sent by old lib… · symfony/symfony@c8dbd1a · GitHub
[go: up one dir, main page]

Skip to content

Commit c8dbd1a

Browse files
bug #33727 [HttpClient] workaround bad Content-Length sent by old libcurl (nicolas-grekas)
This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] workaround bad Content-Length sent by old libcurl | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | DCA6 New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Issue described in https://curl.haxx.se/mail/lib-2014-01/0106.html, happens with curl 7.29 at least. Commits ------- b8d2496 [HttpClient] workaround bad Content-Length sent by old libcurl
2 parents 0d05f3e + b8d2496 commit c8dbd1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpClient/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)
0