php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25840 ob_start("ob_gzhandler") in combination with flush(): wrong HTTP header output?
Submitted: 2003-10-11 12:49 UTC Modified: 2003-10-12 21:19 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: petrich at tronic-media dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.4RC1 OS: Linux (Kernel 2.4.20)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: petrich at tronic-media dot com
New email:
PHP Version: OS:

 

 [2003-10-11 12:49 UTC] petrich at tronic-media dot com
Description:
------------
Hi,
if using ob_start("ob_gzhandler")
in combination with flush() 
it seems php send wrong HTTP header to the Browser (see Reproduce code).

Thank you
Hans-J?rgen Petrich


Tested with 
Linux OS (Kernel 2.4.20)
Apache2 (2.0.47)
PHP 4.3.4RC1 (as Apache2 Handler)
'./configure' '--with-mysql=/usr' '--with-zlib' '--with-apxs2' 
default php.ini-dist is used






Reproduce code:
---------------
<?php

ob_start("ob_gzhandler");
//header('Content-Encoding: gzip');
//header('Vary: Accept-Encoding');
?>
<html>
<body>
<p>This should be a compressed page.
<? flush();?>
</html>
<body>

Expected result:
----------------
HTTP/1.1 200 OK
Date: Sat, 11 Oct 2003 16:53:06 GMT
Server: Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6b DAV/2 PHP/4.3.4RC1
X-Powered-By: PHP/4.3.4RC1
Content-Encoding: gzip
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=ISO-8859-1


Actual result:
--------------
HTTP/1.1 200 OK
Date: Sat, 11 Oct 2003 16:53:36 GMT
Server: Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6b DAV/2 PHP/4.3.4RC1
X-Powered-By: PHP/4.3.4RC1
Connection: close
Content-Type: text/html; charset=ISO-8859-1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-12 21:19 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

See bug #25701
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 02:01:35 2024 UTC