Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/quanthub_sdmx_proxy/src/Controller/Forwarder.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public function forwardDownload(Request $request): Response {
);
// Force set BOM due to absense of BOM management on Sigma API since v2.
$uri = $request->getRequestUri() ?? '';
if (str_contains($uri, '/engine/data/sync/ott/')) {
if (
str_contains($uri, '/engine/data/sync/ott/')
&& str_contains($response->headers->get('content-disposition'), 'csv')
) {
$content = $response->getContent();
// Add UTF-8 BOM if not present (Excel compatibility).
if (strncmp($content, "\xEF\xBB\xBF", 3) !== 0) {
Expand Down