From: Robert Sesek Date: Sat, 6 Aug 2011 22:39:00 +0000 (-0400) Subject: Don't return in FilterOutput() if there's a body already. X-Git-Tag: api-2~48 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=6fdd02146e27fca488dab6fe04522632d909f708;p=hoplite.git Don't return in FilterOutput() if there's a body already. --- diff --git a/http/output_filter.php b/http/output_filter.php index cc6f201..2d97bcf 100644 --- a/http/output_filter.php +++ b/http/output_filter.php @@ -57,13 +57,11 @@ class OutputFilter if (!$this->_ContinueHandlingResponseForCode($request, $response)) return; - // If there's already raw data for the body, just output that. - if ($response->body) - return; - - // Otherwise, construct the body based on how the Request was received and - // any other information in the response. - $this->_CreateBodyForResponse($request, $response); + // If there's already raw data for the body, just output that. Otherwise, + // construct the body based on how the Request was received and any other + // information in the response. + if (!$response->body) + $this->_CreateBodyForResponse($request, $response); // Now just output the response. header("Status: {$response->response_code}", true, $response->response_code);