Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.4

Bug #10605 Wrong Content-Length on Unicode configuration
Submitted: 2007-04-04 03:25 UTC Modified: 2007-05-18 13:29 UTC
From: amaury Assigned: avb
Status: Closed Package: HTTP_Request (version 1.4.0)
PHP Version: 5.1.2 OS: Linux
Roadmaps: 1.4.1    
Subscription  


 [2007-04-04 03:25 UTC] amaury (Amaury Bouchard)
Description: ------------ HTTP_Request uses strlen() to get the size of binary data. It works well on "1-byte per character" systems (ascii, latin1, ...). But when PHP is configured to use Unicode as its internal encoding (or any other multi-byte encoding), strlen() returns the number of characters and not the number of bytes. The solution is to replace each: strlen($var) by: mb_strlen($var, "ASCII")

Comments

 [2007-05-18 13:29 UTC] avb (Alexey Borzov)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.