Skip to content

Commit 3229813

Browse files
committed
server: deduce service wms from request if not explictly given (SERVICE not mandatory for WMS GetMap / GetFeatureInfo)
(cherry picked from commit 3552b83)
1 parent e983efb commit 3229813

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/server/qgis_map_serv.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,16 @@ int main( int argc, char * argv[] )
392392
//Service parameter
393393
QString serviceString = theRequestHandler->parameter( "SERVICE" );
394394

395+
if ( serviceString.isEmpty() )
396+
{
397+
// SERVICE not mandatory for WMS 1.3.0 GetMap & GetFeatureInfo
398+
QString requestString = theRequestHandler->parameter( "REQUEST" );
399+
if ( requestString == "GetMap" || requestString == "GetFeatureInfo" )
400+
{
401+
serviceString = "WMS";
402+
}
403+
}
404+
395405
// Enter core services main switch
396406
if ( !theRequestHandler->exceptionRaised() )
397407
{

0 commit comments

Comments
 (0)