Skip to content

Commit

Permalink
Server WMS fix case sensistive REQUEST
Browse files Browse the repository at this point in the history
Fixes #32354
  • Loading branch information
elpaso authored and rldhont committed Oct 24, 2019
1 parent aa08cb5 commit cd2412e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/services/wms/qgswms.cpp
Expand Up @@ -95,8 +95,8 @@ namespace QgsWms
}

if ( ( mVersion.compare( QLatin1String( "1.1.1" ) ) == 0 \
&& req.compare( QLatin1String( "capabilities" ) ) == 0 )
|| req.compare( QLatin1String( "GetCapabilities" ) ) == 0 )
&& QSTR_COMPARE( req, "capabilities" ) )
|| QSTR_COMPARE( req, "GetCapabilities" ) )
{
writeGetCapabilities( mServerIface, project, version, request, response, false );
}
Expand Down
4 changes: 4 additions & 0 deletions tests/src/python/test_qgsserver_wms.py
Expand Up @@ -82,6 +82,10 @@ class TestQgsServerWMS(TestQgsServerWMSTestBase):
def test_getcapabilities(self):
self.wms_request_compare('GetCapabilities')

def test_getcapabilities_case_insensitive(self):
self.wms_request_compare('getcapabilities')
self.wms_request_compare('GETCAPABILITIES')

def test_getprojectsettings(self):
self.wms_request_compare('GetProjectSettings')

Expand Down

0 comments on commit cd2412e

Please sign in to comment.