#7 HttpServletResponse->flushBuffer: output sent twice

open
nobody
None
5
2007-02-19
2007-02-19
mr. fox
No

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.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks