diff --git a/system/HTTP/CURLRequest.php b/system/HTTP/CURLRequest.php index 0728b5be08fc..8a9598b92e8e 100644 --- a/system/HTTP/CURLRequest.php +++ b/system/HTTP/CURLRequest.php @@ -543,7 +543,7 @@ protected function applyMethod(string $method, array $curl_options): array if ($method === 'PUT' || $method === 'POST') { // See http://tools.ietf.org/html/rfc7230#section-3.3.2 - if (is_null($this->getHeader('content-length'))) + if (is_null($this->getHeader('content-length')) && ! isset($this->config['multipart'])) { $this->setHeader('Content-Length', '0'); }