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:
Zach Borboa
2015-08-19 23:26:21 -07:00
parent 65aebc1329
commit 2465bf4c17
-1
View File
@@ -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();