Skip to content

Commit 36e89a3

Browse files
committedNov 29, 2016
WMS 1.3 compliance: Each OnlineResource URL intended for HTTP Get requests in the capabilities document is a URL prefix
1 parent 0e0cf3e commit 36e89a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/server/qgswmsserver.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,12 @@ QDomDocument QgsWmsServer::getCapabilities( const QString& version, bool fullPro
427427
hrefString = serviceUrl();
428428
}
429429

430+
//href needs to be a prefix
431+
if ( !hrefString.endsWith( "?" ) && !hrefString.endsWith( "&" ) )
432+
{
433+
hrefString.append( hrefString.contains( "?" ) ? "&" : "?" );
434+
}
435+
430436
if ( version == QLatin1String( "1.1.1" ) )
431437
{
432438
doc = QDomDocument( QStringLiteral( "WMT_MS_Capabilities SYSTEM 'http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd'" ) ); //WMS 1.1.1 needs DOCTYPE "SYSTEM http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"

0 commit comments

Comments
 (0)
Please sign in to comment.