Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/nategood/httpful into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan committed Sep 13, 2013
2 parents ee86ffb + 3330ac2 commit 7c1bac3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Httpful/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,12 @@ public function _curlPrep()
$this->serialized_payload = $this->_serializePayload($this->payload);
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->serialized_payload);
if(!$this->isUpload())
$this->headers['Content-Length'] = strlen($this->serialized_payload) ;
if (function_exists('mb_strlen')) {
$length = mb_strlen($this->serialized_payload, '8bit');
} else {
$length = strlen($this->serialized_payload);
}
$this->headers['Content-Length'] = $length ;
}

$headers = array();
Expand Down

0 comments on commit 7c1bac3

Please sign in to comment.