Skip to content
Permalink
Browse files

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 6, 2019
1 parent 7a5c913 commit a140a4a25acc4f2a42fa93ce57ab89fe06649440
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/server/services/wmts/qgswmtsgetcapabilities.cpp
@@ -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*/ );

0 comments on commit a140a4a

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