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  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2006-12-15 20:20 UTC
Package:
Bug Type:
Summary:
From: balancer at balancer dot ru
New email:
PHP Version: Package Version: OS:

 

 [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!