PEAR is archived and read-only

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

Home » HTML » HTML_AJAX » Bug #6564

Wrong content-length header

Details

Submitted2006-01-24 09:59 UTC
Fromwf at eteleon dot de
Assignedjeichorn
StatusClosed
PackageHTML_AJAX
PHP Version5.1.2
OSLinux
Roadmaps(Not assigned)

Comments

[2006-01-24 09:59 UTC] wf at eteleon dot de

Description:
------------
When zlib.output_compression is enable on the server, the
content-length value is wrong, that is sent in line 361 of the
script AJAX/Server.php. The browser then waits about 10
seconds before it continues it's work.

Test script:
---------------
<?
ini_set( 'zlib.output_compression', '1');

require_once 'HTML/AJAX/Server.php';

$server = new HTML_AJAX_Server();
$server->handleRequest();
?>

Call this script using ?client=all

Actual result:
--------------
The browser loads 22,8 of 87,9 kB and waits...

[2006-01-24 15:53 UTC] jeichorn at php dot net

HTML_AJAX doesn't have access to the new length, so im not sure what we can do to solve this. (The compression happens in an output buffer that isn't acessible from normal PHP code)

I'll look into just disabling the Content-Length header when output_compression is enabled.

[2006-01-24 17:52 UTC] jeichorn at php dot net

Fixed in SVN, we don't longer send a Content-Length header when we detect output_compression