Skip to content

Commit

Permalink
Merge pull request #150 from t3n/Sebobo-patch-1
Browse files Browse the repository at this point in the history
BUGFIX: Prevent empty response for non html formats
  • Loading branch information
Sebobo authored May 22, 2021
2 parents 0b7292c + d630d51 commit af43e96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Classes/Aspect/CollectDebugInformationAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function addDebugValues(JoinPointInterface $joinPoint)

if ($response instanceof Response) {
$output = $response->getBody()->getContents();
$response->getBody()->rewind();

if ($response->getHeader('Content-Type') !== 'text/html'
&& strpos($output, '<!DOCTYPE html>') === false) {
Expand Down

0 comments on commit af43e96

Please sign in to comment.