Skip to content
Permalink
Browse files
log
  • Loading branch information
sbrunner committed Dec 22, 2021
1 parent 3a88e45 commit 8751d865e197d06a83a96cc15c9c55b9cb5cbb55
Showing with 13 additions and 0 deletions.
  1. +1 −0 src/server/qgsserverprojectutils.cpp
  2. +10 −0 src/server/services/wms/qgswmsgetcapabilities.cpp
  3. +2 −0 src/server/services/wms/qgswmsutils.cpp
@@ -318,6 +318,7 @@ QStringList QgsServerProjectUtils::wmsOutputCrsList( const QgsProject &project )
QString QgsServerProjectUtils::serviceUrl( const QString &service, const QgsServerRequest &request, const QgsServerSettings &settings )
{
QgsMessageLog.logMessage( QStringLiteral( "Service URL %1" ).arg( &service ), "qgsserverprojectutils", QgsMessageLog.INFO )
QgsMessageLog.logMessage( QStringLiteral( "Service URL %1" ).arg( &service ), QStringLiteral( "Server" ) )
const QString serviceUpper = service.toUpper();
QString url = settings.serviceUrl( serviceUpper );
if ( ! url.isEmpty() )
@@ -176,6 +176,8 @@ namespace QgsWms

// Get service URL
QUrl href = serviceUrl( request, project, *serverIface->serverSettings() );
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 3 Service URL" ), "wmsgetcapabilities", QgsMessageLog.INFO )
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 3 Service URL" ), QStringLiteral( "Server" ) )

//href needs to be a prefix
QString hrefString = href.toString();
@@ -286,9 +288,13 @@ namespace QgsWms
addKeywordListElement( project, doc, serviceElem );

QString onlineResource = QgsServerProjectUtils::owsServiceOnlineResource( *project );
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 4a Service URL %1" ).arg( onlineResource ), "wmsgetcapabilities", QgsMessageLog.INFO )
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 4a Service URL %1" ).arg( onlineResource ), QStringLiteral( "Server" ) )
if ( onlineResource.isEmpty() )
{
onlineResource = serviceUrl( request, project, *serverSettings ).toString();
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 4b Service URL" ), "wmsgetcapabilities", QgsMessageLog.INFO )
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 4b Service URL" ), QStringLiteral( "Server" ) )
}
QDomElement onlineResourceElem = doc.createElement( QStringLiteral( "OnlineResource" ) );
onlineResourceElem.setAttribute( QStringLiteral( "xmlns:xlink" ), QStringLiteral( "http://www.w3.org/1999/xlink" ) );
@@ -424,6 +430,8 @@ namespace QgsWms

// Get service URL
QUrl href = serviceUrl( request, project, *serverIface->serverSettings() );
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 1 Service URL" ), "wmsgetcapabilities", QgsMessageLog.INFO )
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 1 Service URL" ), QStringLiteral( "Server" ) )

//href needs to be a prefix
QString hrefString = href.toString();
@@ -1292,6 +1300,8 @@ namespace QgsWms
{
// Get service URL
QUrl href = serviceUrl( request, project, *settings );
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 2 Service URL" ), "wmsgetcapabilities", QgsMessageLog.INFO )
QgsMessageLog.logMessage( QStringLiteral( "wmsgetcapabilities 2 Service URL" ), QStringLiteral( "Server" ) )

//href needs to be a prefix
QString hrefString = href.toString();
@@ -32,6 +32,8 @@ namespace QgsWms
{
QUrl serviceUrl( const QgsServerRequest &request, const QgsProject *project, const QgsServerSettings &settings )
{
QgsMessageLog.logMessage( QStringLiteral( "QgsWms Service URL" ), "QgsWms", QgsMessageLog.INFO )
QgsMessageLog.logMessage( QStringLiteral( "QgsWms Service URL" ), QStringLiteral( "Server" ) )
QUrl href;
href.setUrl( QgsServerProjectUtils::wmsServiceUrl( project ? *project : *QgsProject::instance(), request, settings ) );

0 comments on commit 8751d86

Please sign in to comment.