mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix OGC test getfeatureinfo:invalid-info_format
This commit is contained in:
parent
e06ec71260
commit
5230680cdd
@ -1179,8 +1179,12 @@ namespace QgsWms
|
||||
f = Format::XML;
|
||||
else if ( fStr.startsWith( QLatin1String( "text/html" ), Qt::CaseInsensitive ) )
|
||||
f = Format::HTML;
|
||||
else if ( fStr.startsWith( QLatin1String( "text/plain" ), Qt::CaseInsensitive ) )
|
||||
f = Format::TEXT;
|
||||
else if ( fStr.startsWith( QLatin1String( "application/vnd.ogc.gml" ), Qt::CaseInsensitive ) )
|
||||
f = Format::GML;
|
||||
else
|
||||
f = Format::NONE;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
@ -998,7 +998,13 @@ namespace QgsWms
|
||||
QByteArray ba;
|
||||
|
||||
QgsWmsParameters::Format infoFormat = mWmsParameters.infoFormat();
|
||||
if ( infoFormat == QgsWmsParameters::Format::TEXT )
|
||||
|
||||
if ( infoFormat == QgsWmsParameters::Format::NONE )
|
||||
{
|
||||
throw QgsBadRequestException( QStringLiteral( "InvalidFormat" ),
|
||||
QStringLiteral( "Invalid INFO_FORMAT parameter" ) );
|
||||
}
|
||||
else if ( infoFormat == QgsWmsParameters::Format::TEXT )
|
||||
ba = convertFeatureInfoToText( result );
|
||||
else if ( infoFormat == QgsWmsParameters::Format::HTML )
|
||||
ba = convertFeatureInfoToHtml( result );
|
||||
|
Loading…
x
Reference in New Issue
Block a user