Skip to content

Commit 740e4bd

Browse files
author
Oleksandr Iegorov
committed
Fix for issue #21299. Change HEAD action mapping to GET action interface and add HEAD request handling
1 parent b5683e8 commit 740e4bd

File tree

1 file changed

+2
-1
lines changed
  • lib/internal/Magento/Framework/File/Transfer/Adapter

1 file changed

+2
-1
lines changed

lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\File\Mime;
1111
use Magento\Framework\App\Request\Http as HttpRequest;
1212
use Magento\Framework\App\ObjectManager;
13+
use Zend\Http\Headers;
1314

1415
/**
1516
* File adapter to send the file to the client.
@@ -114,7 +115,7 @@ private function getFilePath($options): string
114115
private function prepareResponse($options, string $filepath): void
115116
{
116117
$mimeType = $this->mime->getMimeType($filepath);
117-
if (is_array($options) && isset($options['headers']) && $options['headers'] instanceof \Zend\Http\Headers) {
118+
if (is_array($options) && isset($options['headers']) && $options['headers'] instanceof Headers) {
118119
$this->response->setHeaders($options['headers']);
119120
}
120121
$this->response->setHeader('Content-length', filesize($filepath));

0 commit comments

Comments
 (0)