HttpServletResponse->flushBuffer: output sent twice
Status: Beta
Brought to you by:
mojavelinux
in stratus.http.HttpServletResponse.php, the variable bufferActive is not properly examined when flushBuffer() is called. if the buffer is not active, nothing should be written to the output.
example:
<code>
class AnAction extends Action
{
function &execute(&$mapping, &$form, &$request, &$response){
echo 'executing AnAction.<br/>';
$response->flushBuffer();
return ref(null);
}
}
</code>
<output>
executing AnAction.
executing AnAction.
</output>
adding if (!$this->bufferActive) return; at the top of flushBuffer() will fix the problem.