Skip to content

Commit 2465bf4

Browse files
committed
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.
1 parent 65aebc1 commit 2465bf4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/Curl/Curl.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ public function patch($url, $data = array())
442442
$url = $this->baseUrl;
443443
}
444444
$this->setURL($url);
445-
$this->unsetHeader('Content-Length');
446445
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
447446
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
448447
return $this->exec();

0 commit comments

Comments
 (0)