summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/SiteLogsDownload.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2022-04-05 16:01:59 +0100
committerGreg Roach <greg@subaqua.co.uk>2022-04-05 16:01:59 +0100
commit6172e7f6cb6d9b42e9feef9b728f7561b0d70dc9 (patch)
tree931a4a533937480e53e0198679e362c845bf65c3 /app/Http/RequestHandlers/SiteLogsDownload.php
parent6c21f8bee87860f3207f654266c478a05acfbcba (diff)
downloadwebtrees-6172e7f6cb6d9b42e9feef9b728f7561b0d70dc9.tar.gz
webtrees-6172e7f6cb6d9b42e9feef9b728f7561b0d70dc9.tar.bz2
webtrees-6172e7f6cb6d9b42e9feef9b728f7561b0d70dc9.zip
Upper/lower case mismatch causes wrong content-type header for CSV download
Diffstat (limited to 'app/Http/RequestHandlers/SiteLogsDownload.php')
-rw-r--r--app/Http/RequestHandlers/SiteLogsDownload.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Http/RequestHandlers/SiteLogsDownload.php b/app/Http/RequestHandlers/SiteLogsDownload.php
index 690cc28b00..d19f1a2216 100644
--- a/app/Http/RequestHandlers/SiteLogsDownload.php
+++ b/app/Http/RequestHandlers/SiteLogsDownload.php
@@ -20,6 +20,7 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees\Http\RequestHandlers;
use Fig\Http\Message\StatusCodeInterface;
+use Fisharebest\Webtrees\Registry;
use Fisharebest\Webtrees\Services\SiteLogsService;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
@@ -65,9 +66,9 @@ class SiteLogsDownload implements RequestHandlerInterface
})
->implode('');
- return response($content, StatusCodeInterface::STATUS_OK, [
- 'Content-Type' => 'text/csv; charset=UTF-8',
- 'Content-Disposition' => 'attachment; filename="webtrees-logs.csv"',
+ return Registry::responseFactory()->response($content, StatusCodeInterface::STATUS_OK, [
+ 'content-type' => 'text/csv; charset=UTF-8',
+ 'content-disposition' => 'attachment; filename="webtrees-logs.csv"',
]);
}
}