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

Commit

Permalink
compatibility with middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
bupy7 authored Jan 17, 2018
1 parent 8a0fa99 commit 315cdfa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Listener/RenderOnShutdownListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ public function renderOnShutdown(MvcEvent $event)
return;
}
$contentTypeHeader = $response->getHeaders()->get('Content-type');

if ($contentTypeHeader && $contentTypeHeader->getFieldValue() !== 'text/html') {

if (
$contentTypeHeader
// compatibility with middleware Content-type
&& stripos($contentTypeHeader->getFieldValue(), 'text/html') !== 0
) {
return;
}

Expand Down

0 comments on commit 315cdfa

Please sign in to comment.