From:             pnewman at wanadoo dot nl
Operating system: fedora core 2 (linux)
PHP version:      4.3.10
PHP Bug Type:     Apache2 related
Bug description:  http header function cannot set content-length

Description:
------------
Hi (again)

I recently submitted but as it is closed and I am now using 4.3.10 I will
submit a different one.  This is the old one:
http://bugs.php.net/bug.php?id=31197

Regards,
Peter.

Reproduce code:
---------------
<?php
 ob_start();
 header("Content-Type: text/html");
?>
 <html>
 <body>
 <h1>sdf</h1>
 </body>
 </html>
<? 
 $oblen = ob_get_length();
 header('Content-Lengt: ' . $oblen);
 $oblen = ob_get_length();
 header('Content-Lengt2: ' . $oblen);
 $oblen = ob_get_length();
 header('Content-Length: ' . $oblen);
 ob_end_flush();
?>


Expected result:
----------------
$ lynx -head -source http://localhost/tmp.php
HTTP/1.1 200 OK
Date: Wed, 22 Dec 2004 08:59:31 GMT
Server: Apache/2.0.51 (Fedora)
X-Powered-By: PHP/4.3.10
Content-Lengt: 43
Content-Lengt2: 43
Content-Length: 43
Connection: close
Content-Type: text/html; charset=UTF-8
 
$ lynx -source -dump http://localhost/tmp.php
<html>
<body>
<h1>sdf</h1>
</body>
</html>


Actual result:
--------------
$ lynx -head -source http://localhost/tmp.php
HTTP/1.1 200 OK
Date: Wed, 22 Dec 2004 08:59:31 GMT
Server: Apache/2.0.51 (Fedora)
X-Powered-By: PHP/4.3.10
Content-Lengt: 43
Content-Lengt2: 43
Connection: close
Content-Type: text/html; charset=UTF-8
 
$ lynx -source -dump http://localhost/tmp.php
<html>
<body>
<h1>sdf</h1>
</body>
</html>


-- 
Edit bug report at http://bugs.php.net/?id=31239&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31239&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31239&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31239&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31239&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31239&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31239&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31239&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31239&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31239&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31239&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31239&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31239&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31239&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31239&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31239&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31239&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31239&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31239&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31239&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31239&r=mysqlcfg

Reply via email to