Skip to content

Commit 65c9148

Browse files
authored
Merge pull request #3189 from MGatner/content-length
Bugfix: Multipart Content-Length
2 parents 91a5742 + 59e97f4 commit 65c9148

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/HTTP/CURLRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ protected function applyMethod(string $method, array $curl_options): array
543543
if ($method === 'PUT' || $method === 'POST')
544544
{
545545
// See http://tools.ietf.org/html/rfc7230#section-3.3.2
546-
if (is_null($this->getHeader('content-length')))
546+
if (is_null($this->getHeader('content-length')) && ! isset($this->config['multipart']))
547547
{
548548
$this->setHeader('Content-Length', '0');
549549
}

0 commit comments

Comments
 (0)