Skip to content

Commit 9f8468a

Browse files
authored
Merge pull request #1915 from nowackipawel/patch-54
Fix for POST + JSON (Content-Length added)
2 parents 4c39668 + 04f8be1 commit 9f8468a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

system/HTTP/CURLRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ protected function setCURLOptions(array $curl_options = [], array $config = [])
763763
$json = json_encode($config['json']);
764764
$this->setBody($json);
765765
$this->setHeader('Content-Type', 'application/json');
766+
$this->setHeader('Content-Length', (string) strlen($json));
766767
}
767768

768769
// version

0 commit comments

Comments
 (0)