Skip to content

Commit

Permalink
Use correct MIME type for XML output
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
  • Loading branch information
Sesquipedalian committed Feb 9, 2025
1 parent c7c983f commit cd2f76c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ public static function template_header(): void
}
}

$content_type = Forum::getCurrentAction()?->getOutputType()->getMimeType() ?? 'text/' . (isset($_REQUEST['xml']) ? 'xml' : 'html');
$content_type = Forum::getCurrentAction()?->getOutputType()->getMimeType() ?? (isset($_REQUEST['xml']) ? 'application/xml' : 'text/html');

header('Content-Type: ' . $content_type . '; charset=' . (empty(Utils::$context['character_set']) ? 'ISO-8859-1' : Utils::$context['character_set']));

Expand Down

0 comments on commit cd2f76c

Please sign in to comment.