From 59e97f47956f88a6a86861dfc1e3952cad8b86c5 Mon Sep 17 00:00:00 2001 From: MGatner Date: Wed, 1 Jul 2020 01:01:00 +0000 Subject: [PATCH] Prevent content length for multipart --- system/HTTP/CURLRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); }