From: phpbug at paypc dot com
Operating system: All
PHP version: 5CVS-2003-08-26 (dev)
PHP Bug Type: Feature/Change Request
Bug description: A new API call to return actual HTTP content-length accurately is
needed.
Description:
------------
Seeing as ob_get_length() is problematic for use in constructing HTTP/1.1
Content-Length: headers due to its design goals being at variance with
being used for such purpose, I would like to request a new API call be
introduced which *CAN* be used for Content-Length: headers.
Such API call should return the correct value with or without trans_sid
being enabled, and it should also return the correct result when
alternative output handlers (such as the gzhandler) are hooked in.
I realise this may take a few releases. :) Thanks! Incidentally, I've
find using the ob_* functions to be a complete lifesaver, allowing me to
greatly simplify alot of page-scripts... being able to throw a
header("Location:") at the "end" of my PHP script allows me immense
freedom in handling certain kinds of exceptions, which otherwise would
have involved very intricate logic.
Cheers,
=Lord Apollyon=
Reproduce code:
---------------
If trans_sid or the gzhandler is used, any call to ob_get_length() will
return incorrect values, thus making it useless to generate HTTP/1.1
Content-Length: headers from this value. Since there is nothing else even
remotely like this API entry-point to obtain such information, a new one
is called for.
--
Edit bug report at http://bugs.php.net/?id=25265&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25265&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25265&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25265&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25265&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25265&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25265&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25265&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25265&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25265&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25265&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25265&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25265&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25265&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25265&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25265&r=gnused