rfc:continue_ob

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:continue_ob [2015/02/19 13:18] – fix version mikerfc:continue_ob [2015/03/25 14:11] – accepted mike
Line 1: Line 1:
 ====== PHP RFC: Continue output buffering despite aborted connection ====== ====== PHP RFC: Continue output buffering despite aborted connection ======
-  * Version: 1.0+  * Version: 1.1
   * Date: 2015-02-19   * Date: 2015-02-19
-  * Last-Modfied: 2015-02-19+  * Last-Modfied: 2015-02-20
   * Author: Michael Wallner <mike@php.net>   * Author: Michael Wallner <mike@php.net>
-  * Status: Under Discussion+  * Status: Accepted
   * First Published at: http://wiki.php.net/rfc/continue_ob   * First Published at: http://wiki.php.net/rfc/continue_ob
  
Line 15: Line 15:
 ==== Current Status ==== ==== Current Status ====
  
-As of PHP-5.4+As of PHP-5.4 and above, which might be a regression I introduced in the rewritten output layer.
  
 === ignore_user_abort = FALSE === === ignore_user_abort = FALSE ===
  
-The script ends as soon as an aborted connection is detected, either by an unbuffered write or an output exceeding it'chunk size (which would result in an unbuffered write).+The script ends as soon as an aborted connection is detected, either by an unbuffered write or an output exceeding its chunk size (which would result in an unbuffered write).
  
 === ignore_user_abort = TRUE === === ignore_user_abort = TRUE ===
  
 The script continues to run, but any **already buffered** output will be discarded after processing by any output handler, and more importantly, **any output generated by the script is simply discarded, without ever hitting the output buffer** or any output handler. Output buffers and handlers will just sit in the stack until the output layer is deactivated. The script continues to run, but any **already buffered** output will be discarded after processing by any output handler, and more importantly, **any output generated by the script is simply discarded, without ever hitting the output buffer** or any output handler. Output buffers and handlers will just sit in the stack until the output layer is deactivated.
 +
 +There are a few unimportant functions already broken now:
 +  * phpinfo
 +  * highlight_{file,string} with return_output=TRUE
 +  * print_r, var_export with return_output=TRUE
 +  * SoapServer::handle (unimportant because the connection is already broken)
  
 ===== Proposal ===== ===== Proposal =====
Line 37: Line 43:
 === ignore_user_abort = TRUE === === ignore_user_abort = TRUE ===
  
-The output buffer stack **stays intact and usable**. Any generated output will be **passed to any output buffers**, which will call any output handlers to process the buffer. **Only now** will any generated output of the output handler be **discarded.**+The output buffer stack **stays intact and usable**. Data generated by a script will be **passed to any output buffers**, which will call respective output handlers to process the buffer.  
 + 
 +**Only now** will any generated data of the output handler be **discarded.** That is, before the direct unbuffered write to the SAPI.
  
 ==== Bacon^WBenefits ==== ==== Bacon^WBenefits ====
Line 52: Line 60:
 Standard behavior will stay the same. Standard behavior will stay the same.
  
-===== Proposed Voting Choices ===== +===== Vote ===== 
-Simple YES/NO vote with a 50%+1 majority needed to accept this RFC.+<doodle title="Continue output buffering on aborted connection?" auth="mike" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle> 
 +Vote will close on Sunday, March 22nd around 8:00UTC.
  
 ===== Implementation ===== ===== Implementation =====
Line 102: Line 114:
 ===== Changelog ===== ===== Changelog =====
   * 1.0 Proposed   * 1.0 Proposed
 +  * 1.1 Rewordings, list of broken internal functions
rfc/continue_ob.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1