PHP 4.0 Bug #8108 Updated: ob_length() doesn't take into account strings added by trans-sid
| From: | phpbug at jbirch dot com | Date: | Mon, 11 Dec 2000 16:42:48 +0000 |
| Subject: | PHP 4.0 Bug #8108 Updated: ob_length() doesn't take into account strings added by trans-sid | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40862@lists.php.net to get a copy of this message | ||
ID: 8108
User Update by: phpbug@jbirch.com
Status: Analyzed
Bug Type: Output Control
Description: ob_length() doesn't take into account strings added by trans-sid
I've been thinking about this a bit more. I'm not sure if adding the ability to obtain
the correct length of the buffered output in this case is more important than retailing the ability
to save a non-user-specific version of the output.
"Fixing" my problem would mean that a page caching system that writes plain .html files
from database using the ob_ functions would be broken.
Would it be possible to add a function that performs the same function as trans-sid, but at a script
level? With this in place, I could turn off trans-sid and manipulate the output buffer directly.
A generic ob_filter() facility could come in handy for other things too, such as highlighing search
terms in a page request. Especially if it had a switch to filter the HTML, the marked up text, or
both.
Previous Comments:
---------------------------------------------------------------------------
[2000-12-11 09:45:54] stas@php.net
Actually, I guess trans-sid should be implemented as
output-buffering filter, just as gz-compression. Otherwise
what you are trying to do would never work.
---------------------------------------------------------------------------
[2000-12-05 02:32:04] phpbug@jbirch.com
Sorry, miscategorized.
---------------------------------------------------------------------------
[2000-12-05 02:04:24] phpbug@jbirch.com
I've got php4.3.3pl1 compiled as a CGI with --enable-trans-sid.
I currently use the ob_length function to send a Content-Length header with my semi-static pages to
enhance their cacheability. As soon as I enabled trans-sid with cookies disabled this behaviour
broke, because ob_length appears to be calculated before the SID is applied to the page. My pages
get truncated by browsers that accept the content-length header (all modern browsers).
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8108