Skip to content

Commit

Permalink
[Server] Fix: QUrl::FullyDecoded is not permitted when reconstructing…
Browse files Browse the repository at this point in the history
… the full URL
  • Loading branch information
rldhont committed Aug 21, 2018
1 parent c9409e5 commit 1bae625
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/server/services/wcs/qgswcsutils.cpp
Expand Up @@ -251,7 +251,7 @@ namespace QgsWcs
q.removeAllQueryItems( QStringLiteral( "_DC" ) );

url.setQuery( q );
href = url.toString( QUrl::FullyDecoded );
href = url.toString();

}

Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wfs/qgswfsutils.cpp
Expand Up @@ -53,7 +53,7 @@ namespace QgsWfs
params.remove( QgsServerParameter::SERVICE );

url.setQuery( params.urlQuery() );
href = url.toString( QUrl::FullyDecoded );
href = url.toString();
}

return href;
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsdescribelayer.cpp
Expand Up @@ -84,7 +84,7 @@ namespace QgsWms

// get the wms service url defined in project or keep the one from the
// request url
QString wmsHrefString = serviceUrl( request, project ).toString( QUrl::FullyDecoded );
QString wmsHrefString = serviceUrl( request, project ).toString();

// get the wfs service url defined in project or take the same as the
// wms service url
Expand Down
6 changes: 3 additions & 3 deletions src/server/services/wms/qgswmsgetcapabilities.cpp
Expand Up @@ -167,7 +167,7 @@ namespace QgsWms
QUrl href = serviceUrl( request, project );

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

// XML declaration
Expand Down Expand Up @@ -407,7 +407,7 @@ namespace QgsWms
QUrl href = serviceUrl( request, project );

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

QDomElement capabilityElem = doc.createElement( QStringLiteral( "Capability" )/*wms:Capability*/ );
Expand Down Expand Up @@ -1140,7 +1140,7 @@ namespace QgsWms
QUrl href = serviceUrl( request, project );

//href needs to be a prefix
QString hrefString = href.toString( QUrl::FullyDecoded );
QString hrefString = href.toString();
hrefString.append( href.hasQuery() ? "&" : "?" );
for ( const QString &styleName : currentLayer->styleManager()->styles() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsgetcontext.cpp
Expand Up @@ -311,7 +311,7 @@ namespace QgsWms
QUrl href = serviceUrl( request, project );

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

// COntext Server Element with WMS service URL
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wmts/qgswmtsutils.cpp
Expand Up @@ -74,7 +74,7 @@ namespace QgsWmts
params.remove( QgsServerParameter::SERVICE );

url.setQuery( params.urlQuery() );
href = url.toString( QUrl::FullyDecoded );
href = url.toString();
}

return href;
Expand Down

0 comments on commit 1bae625

Please sign in to comment.