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

Bug #9374 Incorrect work HTTP_Request::_readChunked()
Submitted: 2006-11-18 08:43 UTC
From: balancer at balancer dot ru Assigned:
Status: Bogus Package: HTTP_Request
PHP Version: 5.1.6 OS: Gentoo Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 5 - 1 = ?

 
 [2006-11-18 08:43 UTC] balancer at balancer dot ru (Roman Karshiev)
Description: ------------ Function _readChunked() using function strlen() for get chunked string size. It's incorrect for unicode system. Test script: --------------- <xmp><?php require_once "HTTP/Request.php"; $req = &new HTTP_Request("http://control.renter.ru/ipstat/"); $req->addHeader("Accept-Charset", 'UTF-8'); $req->addHeader("Accept-Encoding", 'none'); $resp = $req->sendRequest(); if (!PEAR::isError($resp)) $resp = $req->getResponseBody(); else $resp = $resp->getMessage(); echo "resp=".$resp; ?></xmp> Expected result: ---------------- Full html page. Actual result: -------------- Truncated HTML page. If change HTTP/Requset.php:1176 from $this->_chunkLength -= strlen($data); to $this->_chunkLength -= strlen($data) - 1; then page downloaded full. Need to change from strlen($data) to function returns really byte-length (not char-length).

Comments

 [2006-12-15 20:04 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-12-15 20:20 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!