File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1179,8 +1179,12 @@ namespace QgsWms
1179
1179
f = Format::XML;
1180
1180
else if ( fStr .startsWith ( QLatin1String ( " text/html" ), Qt::CaseInsensitive ) )
1181
1181
f = Format::HTML;
1182
+ else if ( fStr .startsWith ( QLatin1String ( " text/plain" ), Qt::CaseInsensitive ) )
1183
+ f = Format::TEXT;
1182
1184
else if ( fStr .startsWith ( QLatin1String ( " application/vnd.ogc.gml" ), Qt::CaseInsensitive ) )
1183
1185
f = Format::GML;
1186
+ else
1187
+ f = Format::NONE;
1184
1188
1185
1189
return f;
1186
1190
}
Original file line number Diff line number Diff line change @@ -998,7 +998,13 @@ namespace QgsWms
998
998
QByteArray ba;
999
999
1000
1000
QgsWmsParameters::Format infoFormat = mWmsParameters .infoFormat ();
1001
- if ( infoFormat == QgsWmsParameters::Format::TEXT )
1001
+
1002
+ if ( infoFormat == QgsWmsParameters::Format::NONE )
1003
+ {
1004
+ throw QgsBadRequestException ( QStringLiteral ( " InvalidFormat" ),
1005
+ QStringLiteral ( " Invalid INFO_FORMAT parameter" ) );
1006
+ }
1007
+ else if ( infoFormat == QgsWmsParameters::Format::TEXT )
1002
1008
ba = convertFeatureInfoToText ( result );
1003
1009
else if ( infoFormat == QgsWmsParameters::Format::HTML )
1004
1010
ba = convertFeatureInfoToHtml ( result );
You can’t perform that action at this time.
0 commit comments