Commit cd4701a0 authored by Mitchel's avatar Mitchel Committed by Stephen Mustgrave
Browse files

Issue #3313339: Content Type Header No Longer Being Attached

parent 0dc4b56c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -211,6 +211,10 @@ class DisplayController extends EntityViewController {
      $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $file->getFilename());
    }

    if (!$response->headers->has('Content-Type')) {
      $response->headers->set('Content-Type', $file->getMimeType() ?: 'application/octet-stream');
    }

    return $response;
  }