Skip to content
Permalink
Browse files

Backward support for parameters 'MTVER' and 'capabilities' from WMS 1…

….0.0 is required for WMS 1.1.1
  • Loading branch information
mhugent authored and rldhont committed Dec 13, 2016
1 parent f5c28c3 commit 28295e1527ee4a6c2e541ea13ea64f1bc7bef8e8
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/server/qgswmsserver.cpp
@@ -147,13 +147,30 @@ void QgsWMSServer::executeRequest()
}

//version
QString version = mParameters.value( "VERSION", "1.3.0" );
QString version = "1.3.0";
if ( mParameters.contains( "VERSION" ) )
{
version = mParameters.value( "VERSION" );
}
else if ( mParameters.contains( "WMTVER" ) ) //WMTVER needs to be supported by WMS 1.1.1 for backwards compatibility with WMS 1.0.0
{
version = mParameters.value( "WMTVER" );
}

bool getProjectSettings = ( request.compare( "GetProjectSettings", Qt::CaseInsensitive ) == 0 );
if ( getProjectSettings )
{
version = "1.3.0"; //getProjectSettings extends WMS 1.3.0 capabilities
}

if ( version == "1.1.1" )
{
if ( request.compare( "capabilities", Qt::CaseInsensitive ) == 0 )
{
request = QString( "GetCapabilities" );
}
}

//GetCapabilities
if ( request.compare( "GetCapabilities", Qt::CaseInsensitive ) == 0 || getProjectSettings )
{

0 comments on commit 28295e1

Please sign in to comment.
You can’t perform that action at this time.