Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Do not emit response if headers were already sent.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed May 23, 2016
1 parent 4bac0a7 commit 23afc71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -79,6 +79,9 @@ public static function handleRequest(ServerRequestInterface $request, ResponseIn

$response = Server::callNextMiddleWare($request, $response, $next);

if(headers_sent()){
return;
}
if($response !== false && $response->getBody() && $response->getBody() instanceof SerializableResponseStream){
// For the moment, use XML by default
if($request->hasHeader("Accept") && $request->getHeader("Accept")[0] == "application/json"){
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/gui.ajax/res/themes/orbit/css/allz.css

Large diffs are not rendered by default.

0 comments on commit 23afc71

Please sign in to comment.