summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2015-03-25 15:22:37 +0100
committerMichael Wallner <mike@php.net>2015-03-25 15:22:49 +0100
commit0ae011f3a7ed17fb1d0081f766ce5b5b73c759a6 (patch)
tree8a77b4acfd7aadd5725f57fcaf72e5f8ae7a430a
parent2fe6acd8f5827235774789cfc1c4e54a9eaa6c59 (diff)
downloadphp-git-0ae011f3a7ed17fb1d0081f766ce5b5b73c759a6.tar.gz
RFC:continue_ob accepted
-rw-r--r--NEWS1
-rw-r--r--UPGRADING5
-rw-r--r--main/output.c9
3 files changed, 8 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 31ed52641e..09e88523f8 100644
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,7 @@
(Anatol)
. Implemented the RFC `Scalar Type Decalarations v0.5`. (Anthony)
. Implemented the RFC `Group Use Declarations`. (Marcio)
+ . Implemented the RFC `Continue Output Buffering`. (Mike)
- Curl:
. Fixed bug #68937 (Segfault in curl_multi_exec). (Laruence)
diff --git a/UPGRADING b/UPGRADING
index 6ebc4218df..7f45aeccf4 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -564,4 +564,7 @@ For more details see https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts
always be zero when casted to integer.
. Calling a method on a non-object no longer raises a fatal error; see
also: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object.
- . Error messages for zend_parse_parameters, type hints and conversions now always say "integer" and "float" instead of "long" and "double".
+ . Error messages for zend_parse_parameters, type hints and conversions now
+ always say "integer" and "float" instead of "long" and "double".
+ . Output buffering now continues to work for an aborted connection if
+ ignore_user_abort is set to true.
diff --git a/main/output.c b/main/output.c
index 22ac26a7c5..a0a300b376 100644
--- a/main/output.c
+++ b/main/output.c
@@ -242,9 +242,6 @@ PHPAPI int php_output_get_status(void)
* Unbuffered write */
PHPAPI size_t php_output_write_unbuffered(const char *str, size_t len)
{
- if (OG(flags) & PHP_OUTPUT_DISABLED) {
- return 0;
- }
if (OG(flags) & PHP_OUTPUT_ACTIVATED) {
return sapi_module.ub_write(str, len);
}
@@ -256,13 +253,13 @@ PHPAPI size_t php_output_write_unbuffered(const char *str, size_t len)
* Buffered write */
PHPAPI size_t php_output_write(const char *str, size_t len)
{
- if (OG(flags) & PHP_OUTPUT_DISABLED) {
- return 0;
- }
if (OG(flags) & PHP_OUTPUT_ACTIVATED) {
php_output_op(PHP_OUTPUT_HANDLER_WRITE, str, len);
return len;
}
+ if (OG(flags) & PHP_OUTPUT_DISABLED) {
+ return 0;
+ }
return php_output_direct(str, len);
}
/* }}} */