PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTTP » HTTP_Request » Bug #8245

Empty body (gzip?)in CurrentResponse

Details

Submitted2006-07-19 12:03 UTC
Frommmsmodell at mms-modell dot hu
Assignedavb
StatusClosed
PackageHTTP_Request
PHP Version5.0.0
OSDebian
Roadmaps(Not assigned)

Comments

[2006-07-19 12:03 UTC] mmsmodell at mms-modell dot hu

Description:
------------
Dear Developers,

In some situations HTTP_Client will return an empty body, even though browsers are perfectly capable of reading the given page.

Most recently I experienced the problem with an xxx collection messiestfacials.com, but I think more legitimate sites would behave the same.

The hader info returned for this address is -

Array ( [code] => 200 [headers] => Array ( [date] => Wed, 19 Jul 2006 11:53:50 GMT [server] => Apache/1.3.34 (Unix) PHP/4.4.1 [content-encoding] => gzip [connection] => close [transfer-encoding] => chunked [content-type] => text/html ) [body] => )

Strangely IE will read the page, and the same code works very well for other websites.

The code below generates this output.
Any Idea?
Thank you, waiting for your answer,

Test script:
---------------
require_once "HTTP/Client.php";
$client = new HTTP_Client();
$url="http://www.messiestfacials.com/";
$client->get($url);
$url_a = $client->CurrentResponse();
print_r($url_a);
$url_ = $url_a['body'];
echo($url_);

Expected result:
----------------
I would expect a non-empty body, and the page displayed.

Actual result:
--------------
Array ( [code] => 200 [headers] => Array ( [date] => Wed, 19 Jul 2006 11:53:50 GMT [server] => Apache/1.3.34 (Unix) PHP/4.4.1 [content-encoding] => gzip [connection] => close [transfer-encoding] => chunked [content-type] => text/html ) [body] => )