Commit Graph

128 Commits

Author SHA1 Message Date
Marcus Boerger
1e6557f664 Fix implicit_flush 2002-10-02 15:36:29 +00:00
Marcus Boerger
ff51ed7c6f Modified get_status(): Display chunk_size allways and size which is in
most cases initial_size as well as block_size only when used.
2002-10-02 15:10:11 +00:00
Marcus Boerger
d4bba6d158 Revisted Wez patch: chunk_size 0 means cahce the whole output. So
we must apply the default before calling php_enable_output_compression().
I have left the default setting in the rinit function even though i do think
it is not necessary.
2002-10-02 15:02:16 +00:00
Yasuo Ohgaki
e92abff88b Fixed bug #17825. Double zval_ptr_dtor(). 2002-10-01 10:01:56 +00:00
Yasuo Ohgaki
3d8e33f06a Fixed implicit flush. 2002-10-01 02:43:33 +00:00
Yasuo Ohgaki
ecf146cbce Users can shoot themselves by their own output handler always.
Therefore, this check is overkill and it should be documented
limitation, IMO.

Anyway, a little optimization.
2002-09-30 23:46:43 +00:00
Wez Furlong
4356932dfe Fix infinite recursion bug when using zlib output compression.
Cause: the chunk size is taken from the zlib.output_compression setting,
which is 0 or 1.  This causes the block_size for output buffer to be set
to 0 (1 / 2) and thus causes infinite recursion in php_ob_allocate().
Solution: use a value of 0 for the chunk size which will use the default
sizes.  Also add a sanity check which will default the block_size to 1
if it ends up as 0.
2002-09-30 10:18:06 +00:00
Zeev Suraski
85f4abfdac Fix bug #19525 2002-09-23 14:18:42 +00:00
Sebastian Bergmann
714c19fe66 Per discussion on #php.bugs (+1 from at least Derick and Jani), revert double_buffering. 2002-09-01 11:33:19 +00:00
Marcus Boerger
8638bb882f Removed __output_handler as everybody seems against such implicit
behaviour. Instead supply error message.
2002-08-25 14:20:37 +00:00
Marcus Boerger
6d97e0c3eb Use zend_is_callable() instead of php_check_object_method_array() and
drop the latter. THX to Markus Fischer - i did not recognize this function.

@Expanded ob_start() to allow object parameters without methodnames and
@use default method __output_handler(). (Marcus)
2002-08-25 12:16:48 +00:00
Marcus Boerger
08ab630dc7 Reenable array(object,method) in ob_start() 2002-08-25 11:50:25 +00:00
Zeev Suraski
a6e8e72372 Fix ob_gzhandler()'s handling of requests w/o compression but that do have
the Accept-Encoding header
2002-08-23 08:37:35 +00:00
Marcus Boerger
28970b9260 fix warning 2002-08-22 10:52:40 +00:00
Marcus Boerger
5e7a9af062 full decopling of size parameters of ob_start() and internal buffer handlers
#intended behaviour is now fully implemented,
2002-08-21 03:04:17 +00:00
Marcus Boerger
b98c26382f Ignore double_buffering for ob_start(). 2002-08-21 01:00:56 +00:00
Marcus Boerger
8e10659648 Revert ob_start() defaults to 40K/10K until i find a better solution. 2002-08-20 23:23:25 +00:00
Marcus Boerger
2a443b2e77 Changed handling of output buffer sizes.
@Added php.ini option "double_buffering" that forces an additional first
@output buffer and improved handling of buffer sizes. (Marcus)
2002-08-20 19:49:37 +00:00
Marcus Boerger
8b30aeacd8 -use of php_error_docref
-some more information in ob_get_status()
2002-08-19 18:47:23 +00:00
Rasmus Lerdorf
3ffe4cb1ff bool not boolean 2002-08-13 04:37:28 +00:00
Rasmus Lerdorf
34362341e9 Use int, not integer. 2002-08-13 04:31:59 +00:00
Marcus Boerger
21903dfc7e corrected handling of internal output buffers
minor fixs
2002-08-10 16:12:36 +00:00
Marcus Boerger
9c8ba935d6 Improved handling of output buffers (see news)\n#No trim for the string parameter... 2002-08-09 22:29:58 +00:00
Marcus Boerger
6d21c9465d Added php_ob_handler_used to check if a specific output handler is used
in c.
2002-08-05 18:54:53 +00:00
Marcus Boerger
fd26a5c0a9 -New function ob_list_handlers
@- Added ob_list_handlers() which returns an array of all active output
@  handlers. (marcus)
2002-08-05 03:09:42 +00:00
Zeev Suraski
2369533bf9 Remove redundant code (thanks to Jani for pointing that out) 2002-05-12 22:17:58 +00:00
Yasuo Ohgaki
2b5beee5ad Added estrdup() needed.
Fixed typo.
2002-05-08 11:44:14 +00:00
Zeev Suraski
fe127f93de We shouldn't force Content-length:, but much worse, it's wrong in many
cases (basically, unless you use output buffering to buffer all of your content,
it won't work;  output buffering is used for lots of different things as a
functional interface, and such buffers have no relation to Content-type at
all).
2002-05-04 23:23:16 +00:00
Sascha Schumann
707b8b019e Free string before overwriting it 2002-05-04 19:06:46 +00:00
Sascha Schumann
9743860d35 simplify handling of variables by maintaining two strings which
are simply appended instead of traversing the hash table on each
URL/form.

also fix an unconditional segfault in rshutdown due to efree'ing
a static char *.

remove remove_var, add reset_vars.  move the function declarations
into the right header file.
2002-05-04 18:33:13 +00:00
Yasuo Ohgaki
ae828233fe Forgot to dup strings. 2002-05-04 10:55:08 +00:00
Yasuo Ohgaki
b1b5e42251 Fixed reference to freed zval string value. 2002-05-04 09:46:44 +00:00
Yasuo Ohgaki
dfc48de0cb Fixed crash when buffer is over written in ob callback. (Bug $ 12227)
Added check current output function check for Centent-Length header.
@ Fixed output buffer crash when buffer is over written in callback. (Yasuo)
2002-05-04 03:02:51 +00:00
Thies C. Arntzen
9712a4b3c8 @ - Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
@   and remove variables from the URL-Rewriter. (thies)
i have also modified the session module to use this - so it doesn't
need to fiddle with the output-system any more
2002-05-03 08:00:41 +00:00
Yasuo Ohgaki
5b83e9294c Change nest level to send Content-Length again. It seems this is the
best setting for now.

PHP will not send Content-Length always. It only sends when it is
possible to send. output_buffer=0 is supposed to disable chunked
output, but it seems it does not disable. It also behaves a litte
strange way. This should be addressed someday.

It is possible Content-Length header is not set. If it happens, try to
increase chunk size for now. (i.e. output_buffer=40960)

I included a little debug code for me and other develpers to play with,
when (NestLevel==1 && ObStatus==5), PHP sends Content-Length.
2002-05-02 13:55:05 +00:00
Yasuo Ohgaki
1103311eee Fixed header output. Only need to output header when it is actually sent to client. 2002-05-02 06:50:18 +00:00
Yasuo Ohgaki
8ee815ec91 Check buffer status 2002-05-02 04:04:59 +00:00
Yasuo Ohgaki
f61b795a8f Make Content-Type output always correct.
# Flushing buffer is needed to be fixed properly anyway...
2002-05-02 01:58:12 +00:00
Yasuo Ohgaki
43df0c78c0 Move Content-Length: header handling from zlib.c to output.c
When output buffer is enabled and header can be sent, Content-Length:
header is added always from now on.
2002-05-02 01:12:01 +00:00
Stanislav Malyshev
68e5f549c0 Init output_start_* to avoid "output started at ZZZZZ" messages
(which may result when output started while zend is neither compiling nor
executing - e.g., when file upload fails).
2002-04-24 16:53:07 +00:00
Jon Parise
57472aa318 Silence warning under Solaris 8 (WorkShop Compilers 5.0 98/12/15 C 5.0). 2002-03-04 10:58:00 +00:00
Hartmut Holzgraefe
bff90c71c1 typo fix 2002-03-02 16:41:55 +00:00
Yasuo Ohgaki
46bb7e0031 Do explicit test againt to FAILURE.
# Thanks Rasmus.
2002-03-01 09:29:32 +00:00
Yasuo Ohgaki
82a8d372e5 Added ob_get_status() to get array of buffers and it's status.
(DO NOT document this function yet)

Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
buffers that may not be deleted.

php_start_ob_buffer() and php_ob_set_internal_handler() takes parameter for
if the buffer created may be deleted or not.

Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
deleted until script finshes.

Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure.

@ - Added ob_get_status() to get array of buffers and it's status. (Yasuo)
@ - Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
@   buffers that may not be deleted. (Yasuo)
@ - Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
@   deleted until script finshes. (Yasuo)
@ - Changed ob_*() function that have void return type to bool. All ob_*()
@   functions return TRUE for success, FALSE for failure. (Yasuo)
2002-03-01 03:05:50 +00:00
Yasuo Ohgaki
88e3aa7af6 Legacy code removed.
This line incorrectly removes buffer.
This line was correct only when ouput.c does not support
nested output buffers. Fixed bug #15178
2002-02-07 02:50:28 +00:00
Yasuo Ohgaki
a3e676f64b pval -> zval
Check number of parameters
2002-02-05 07:37:42 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Derick Rethans
1f14640b3e - Added ob_get_level, which returns the nesting level of the output buffering
mechanism. (patch by Yasuo Ohgaki <yasuo_ohgaki@yahoo.com>)
@- Added ob_get_level, which returns the nesting level of the output buffering
@  mechanism. (Yasuo, Derick)
2001-12-03 07:43:53 +00:00
Derick Rethans
9190271cef - Added ob_flush and ob_clean functions, which do not end the buffer like
ob_end_flush and ob_end_clean do.
@- Added ob_flush and ob_clean functions, which flush and clean an
@  output buffer without destroying the buffer. (Derick)
2001-11-30 10:48:38 +00:00
Jeroen van Wolffelaar
c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00