Re: Missing conntent from some php apps when some headers exist in the get request

Delian Krustev <[email protected]> Tue, 20 Jul 2004 20:12:53 +0300
Newsgroups gmane.comp.apache.mod-layout
Message-ID <[email protected]>
Greetings,

The problem is localized:

*****************************************
<?php
ob_start('ob_gzhandler');
?>

<html>
<body>
<p>It's like comparing apples to oranges.
</body>
</html>

<?php

ob_end_flush();
?>
*****************************************

if the php func ob_gzhandler decides to send the content in
"Content-Encoding: gzip", that happens if the browser sends
the appropriate Accept-Encoding in the request, the contenent
is corrupted. mod_layout actually wipes the "Content-Encoding: gzip"
header from the response in that case.

It seems there's no solution to this(except decompressing the content
and inserting the text in it). It's possible that the same problem will
appear with mod_gzip. Probably the module insertion order in apache
will matter in that case. However I haven't tested that ..

Cheers,
Delian