Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Append ? to WMTS GetCapabilities
This makes WMTS behave equal to the WMS implementation which already appends a ? in case there is no query string supplied.

Some parsers rely on a terminating ? to work properly.
  • Loading branch information
m-kuhn committed Feb 7, 2019
1 parent 7a5c913 commit a140a4a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server/services/wmts/qgswmtsgetcapabilities.cpp
Expand Up @@ -278,8 +278,12 @@ namespace QgsWmts
QDomElement httpElement = doc.createElement( QStringLiteral( "ows:HTTP" )/*ows:HTTP*/ );
dcpElement.appendChild( httpElement );

//Prepare url
QString hrefString = serviceUrl( request, project );
// Get service URL
const QUrl href = serviceUrl( request, project );

//href needs to be a prefix
QString hrefString = href.toString();
hrefString.append( href.hasQuery() ? '&' : '?' );

//ows:Get
QDomElement getElement = doc.createElement( QStringLiteral( "ows:Get" )/*ows:Get*/ );
Expand Down

0 comments on commit a140a4a

Please sign in to comment.