Only change headers if necessary

This commit is contained in:
Raúl Marín 2023-10-17 16:02:06 +02:00
parent e500dc22e4
commit b4a4c1e02e

View File

@ -1340,7 +1340,7 @@ void executeQuery(
{
String format_name = context->getDefaultFormat();
output_format = FormatFactory::instance().getOutputFormat(format_name, ostr, {}, context, output_format_settings);
if (output_format)
if (output_format && output_format->supportsWritingException())
{
/// Force an update of the headers before we start writing
result_details.content_type = output_format->getContentType();