We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 0d688d4 commit 339d800Copy full SHA for 339d800
src/mapserver/qgswmsserver.cpp
@@ -110,6 +110,22 @@ QDomDocument QgsWMSServer::getCapabilities()
110
QString requestUrl = getenv( "REQUEST_URI" );
111
QUrl mapUrl( requestUrl );
112
mapUrl.setHost( QString( getenv( "SERVER_NAME" ) ) );
113
+
114
+ //Add non-default ports to url
115
+ QString portString = getenv( "SERVER_PORT" );
116
+ if ( !portString.isEmpty() )
117
+ {
118
+ bool portOk;
119
+ int portNumber = portString.toInt( &portOk );
120
+ if ( portOk )
121
122
+ if ( portNumber != 80 )
123
124
+ mapUrl.setPort( portNumber );
125
+ }
126
127
128
129
if ( QString( getenv( "HTTPS" ) ).compare( "on", Qt::CaseInsensitive ) == 0 )
130
{
131
mapUrl.setScheme( "https" );
0 commit comments