That fix is incorrect:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13

More specifically: *Applications SHOULD use this field to indicate the
transfer-length of the message-body, unless this is prohibited by the rules
in section 4.4.*



On Fri, Sep 13, 2013 at 11:12 AM, wackyfrog <notifications@github.com>wrote:

> In src/Httpful/Request.php:
>
> > @@ -784,6 +784,14 @@ public function _curlPrep()
> >          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->strict_ssl);
> >          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> >
> > +        // https://github.com/nategood/httpful/issues/84
> > +        // set Content-Length to the size of the payload if present
> > +        if (isset($this->payload)) {
> > +            $this->serialized_payload = $this->_serializePayload($this->payload);
> > +            curl_setopt($ch, CURLOPT_POSTFIELDS, $this->serialized_payload);
> > +            $this->headers['Content-Length'] = strlen($this->serialized_payload);
>
> <?php
>
>     $a = 'test';
>     var_dump($a, strlen($a), mb_strlen($a), mb_strlen($a, '8bit')) ;
>
>     $a = 'тест';
>     var_dump($a, strlen($a), mb_strlen($a), mb_strlen($a, '8bit')) ;
>
> ?>
>
> Result:
> string 'test' (length=4)
> int 4
> int 4
> int 4
> string 'тест' (length=8)
> int 4
> int 4
> int 8
>
> —
>
> Reply to this email directly or view it on GitHub<https://github.com/nategood/httpful/pull/85/files#r6349942>
> .
>
>