mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-14 04:16:32 +00:00
Fix invalid request when Content-Length is unset.
"Invalid request (Malformed HTTP request)" and "Empty reply from server" is returned when attempting to unset the Content-Length header by sending a "Content-Length: " header.
This commit is contained in:
@@ -442,7 +442,6 @@ class Curl
|
||||
$url = $this->baseUrl;
|
||||
}
|
||||
$this->setURL($url);
|
||||
$this->unsetHeader('Content-Length');
|
||||
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
|
||||
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
|
||||
return $this->exec();
|
||||
|
||||
Reference in New Issue
Block a user