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

Bug #8213 Warning: gzinflate() data error in C:\AppServ\php\PEAR\HTTP\Request.php on line
Submitted: 2006-07-14 05:25 UTC
From: jun dot ma at csiro dot au Assigned: avb
Status: Closed Package: HTTP_Request (version 1.3.0)
PHP Version: 5.1.4 OS: Windows server 2003
Roadmaps: (Not assigned)    
Subscription  


 [2006-07-14 05:25 UTC] jun dot ma at csiro dot au (jun ma)
Description: ------------ http request gives the following warning message, and the echo $response1 does not work. Warning: gzinflate() [function.gzinflate]: data error in C:\AppServ\php\PEAR\HTTP\Request.php on line 1060 Test script: --------------- $req = &new HTTP_Request("http://www.votapedia.com/index.php?"); $req->setMethod(HTTP_REQUEST_METHOD_POST); $req->clearCookies(); $req->addQueryString('title', 'Special:Userlogin'); $req->addQueryString('action', 'submitlogin'); $req->addQueryString('type', 'signup'); $req->addPostData('wpName', $userName); $req->addPostData('wpPassword', $password); $req->addPostData('wpRetype', $password); $req->addPostData('wpEmail', $email); $req->addPostData('wpRealName', $realName); $req->addPostData('wpCreateaccount', 'Create account'); $req->sendRequest(); $response1 = $req->getResponseBody(); echo $response1; Expected result: ---------------- echo the response page from the server. Actual result: -------------- http request gives the warning message, and the $response1 is not echoed.

Comments

 [2006-10-08 11:08 UTC] avb (Alexey Borzov)
There is a duplicate bug #8245, since the example there can actually be run unlike this one, let's close this bug as duplicate.
 [2006-10-24 20:06 UTC] avb (Alexey Borzov)
The problem with the server in question is that it sends the redirection response with "Content-Encoding: gzip" header, while the response body is actually *not* gzip-encoded! While fixing bug #8245 I added a check whether the body actually starts with a gzip signature. If it doesn't, then it won't be decoded and will be returned as-is.