Commit Graph

103 Commits

Author SHA1 Message Date
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
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Zeev Suraski
357dfd5f14 Support multiple chunked output buffering layers 2001-08-31 15:56:48 +00:00
Zeev Suraski
5c1c22764a Fix double freeing 2001-08-31 15:16:15 +00:00
Zeev Suraski
13ff183225 Move the trans-sid mechanism to use the output buffering mechanism.
Advantages:
- Would work with the output buffering mechanism in general, and with
  output compression in particular
- Should yield better performance (untested as of yet)
2001-08-25 15:57:42 +00:00
Zeev Suraski
e077c6bc28 Make it possible to enable chunked output buffering without providing
an output handling function
2001-08-11 22:55:00 +00:00
Sascha Schumann
373b3e101e more tsrm cleanup -- output.c is not doing any fetches anymore 2001-08-05 15:55:43 +00:00
Sascha Schumann
8aef193056 more tsrm cleanup 2001-08-05 15:29:47 +00:00
Sascha Schumann
aafdfe82cb further tsrm cleanup 2001-08-05 14:36:51 +00:00
Zeev Suraski
1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
Zeev Suraski
bc42c37513 More TSRMLS_FETCH work. Got it under 400 now. 2001-07-31 06:28:05 +00:00
Zeev Suraski
c43806f415 Zend compatibility patch 2001-07-30 08:24:42 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4 - Get rid of ELS_*(), and use TSRMLS_*() instead.
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Zeev Suraski
6f297a370a Fix Windows build 2001-07-20 14:40:30 +00:00
Zeev Suraski
13ac04b8e5 Avoid getting bailouts on text output during shutdown. Text output is now
'officially' disabled during shutdown (this doesn't change the Apache module
behavior, but may change behavior of other server modules, in which it was
possible to emit output during shutdown;  I think it's a good step towards
consistency, though)
2001-07-20 13:59:00 +00:00
Thies C. Arntzen
5676e5ad05 use ZVAL_* macros 2001-07-11 15:27:37 +00:00
Sascha Schumann
ef13ab5750 Improve url scanner speed (up to 40% for large chunks of data)
and handle some corner cases better.  The scanner has been changed
to the format as proposed in "RE2C - A More Versatile Scanner Generator"
by Cowan et al.
2001-07-04 15:30:21 +00:00
Zeev Suraski
551f1831a7 Fix a major thread safety bug in the output mechanism
@- Fixed a major memory corruption bug in the thread safe version (Zeev)
2001-07-02 18:17:10 +00:00
Zeev Suraski
f35b85b4c1 Fix bug #11678 2001-06-26 18:30:31 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Andrei Zmievski
daefeb59d5 Kill warning. 2001-05-29 20:32:57 +00:00
Andi Gutmans
4ddb24366f - Fix problem of output initialization 2001-05-23 16:52:45 +00:00
Andi Gutmans
177934732b - Start nuking not needed GINIT 2001-05-22 19:19:04 +00:00
Zeev Suraski
ff11c36dc5 Avoid crashing if somehow, output is sent in a new thread tha had no requests 2001-05-07 22:00:13 +00:00