File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -106,14 +106,32 @@ QDomDocument QgsWMSServer::getCapabilities()
106
106
// Some client requests already have http://<SERVER_NAME> in the REQUEST_URI variable
107
107
QString hrefString;
108
108
QString requestUrl = getenv ( " REQUEST_URI" );
109
+ QString mapUrl = requestUrl;
109
110
requestUrl.truncate ( requestUrl.indexOf ( " ?" ) + 1 );
111
+
112
+ // find out if a map parameter was specified and ensure
113
+ // it is propogated to the onlineresource
114
+ mapUrl.replace ( requestUrl, " " );
115
+ QStringList myTokens = mapUrl.split ( " &" );
116
+ QString myMap = " " ;
117
+ QStringListIterator myIterator ( myTokens );
118
+ while ( myIterator.hasNext () )
119
+ {
120
+ QString myString = myIterator.next ();
121
+ if ( myString.contains ( " map=" , Qt::CaseInsensitive ) )
122
+ {
123
+ myMap = myString;
124
+ }
125
+ }
126
+
127
+
110
128
if ( requestUrl.contains ( " http" ) )
111
129
{
112
130
hrefString = requestUrl;
113
131
}
114
132
else
115
133
{
116
- hrefString = " http://" + QString ( getenv ( " SERVER_NAME" ) ) + requestUrl;
134
+ hrefString = " http://" + QString ( getenv ( " SERVER_NAME" ) ) + requestUrl + myMap ;
117
135
}
118
136
119
137
You can’t perform that action at this time.
0 commit comments