mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
Add non-default port numbers to GetMap and GetFeatureInfo urls
This commit is contained in:
parent
0d688d42a3
commit
339d800a1f
@ -110,6 +110,22 @@ QDomDocument QgsWMSServer::getCapabilities()
|
||||
QString requestUrl = getenv( "REQUEST_URI" );
|
||||
QUrl mapUrl( requestUrl );
|
||||
mapUrl.setHost( QString( getenv( "SERVER_NAME" ) ) );
|
||||
|
||||
//Add non-default ports to url
|
||||
QString portString = getenv( "SERVER_PORT" );
|
||||
if ( !portString.isEmpty() )
|
||||
{
|
||||
bool portOk;
|
||||
int portNumber = portString.toInt( &portOk );
|
||||
if ( portOk )
|
||||
{
|
||||
if ( portNumber != 80 )
|
||||
{
|
||||
mapUrl.setPort( portNumber );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( QString( getenv( "HTTPS" ) ).compare( "on", Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
mapUrl.setScheme( "https" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user