ID: 31197
Updated by: [EMAIL PROTECTED]
Reported By: pnewman at wanadoo dot nl
-Status: Verified
+Status: Bogus
Bug Type: Output Control
Operating System: fedora core 2 (linux)
PHP Version: 4.3.8
New Comment:
It works fine in Apache 1 and Apache 2 with 4.3.10.
Apache 2 was even intelligent enough to see that the real content
length was 39 bytes and not 48 and adjust the header accordingly.
Previous Comments:
------------------------------------------------------------------------
[2004-12-20 13:30:47] [EMAIL PROTECTED]
It's also happening with Apache 1, I could reproduce this.
------------------------------------------------------------------------
[2004-12-20 12:25:45] pnewman at wanadoo dot nl
I can try but we need to use webdav for subversion which requires
apache2.
I know that you recommend only apache1 with php but this configuration
is default for fedora core 2 and we use mysql which is threadsafe (I
assume fedora people have considered how they built apache2/php/mysql
carefully?).
If this problem does not occur in apache1 would this be a apache bug
and not a php bug?
------------------------------------------------------------------------
[2004-12-20 12:04:47] [EMAIL PROTECTED]
Perhaps Apache mangles headers, did you try apache 1? If not, please
try it.
------------------------------------------------------------------------
[2004-12-20 11:58:49] pnewman at wanadoo dot nl
Description:
------------
Hi
I am scratching my head about this.
Nothing I can do can get the Content-Length to output - I have tried
using ob_start to use a buffer inorder to calculate the exact number of
characters but even a script this simple does not work?
Regards,
Peter.
Reproduce code:
---------------
<?php
header('Content-Length: 48');
?>
<html>
<body>
<p>hi</p>
</body>
</html>
Expected result:
----------------
HTTP/1.1 200 OK
Date: Mon, 20 Dec 2004 10:56:30 GMT
Server: Apache/2.0.51 (Fedora)
X-Powered-By: PHP/4.3.8
Content-Length: 48
Connection: close
Content-Type: text/html; charset=UTF-8
Actual result:
--------------
lynx -head -dump http://localhost/test3.php returns
HTTP/1.1 200 OK
Date: Mon, 20 Dec 2004 10:54:23 GMT
Server: Apache/2.0.51 (Fedora)
X-Powered-By: PHP/4.3.8
Connection: close
Content-Type: text/html; charset=UTF-8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31197&edit=1