Skip to content

Commit f3b1e59

Browse files
committedJul 21, 2011
Improve href url for capabilities response
1 parent d02c4be commit f3b1e59

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed
 

‎src/mapserver/qgswmsserver.cpp

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,28 @@ QDomDocument QgsWMSServer::getCapabilities()
118118
{
119119
mapUrl.setScheme( "http" );
120120
}
121-
mapUrl.removeQueryItem( "REQUEST" );
122-
mapUrl.removeQueryItem( "VERSION" );
123-
mapUrl.removeQueryItem( "SERVICE" );
121+
122+
QList<QPair<QString, QString> > queryItems = mapUrl.queryItems();
123+
QList<QPair<QString, QString> >::const_iterator queryIt = queryItems.constBegin();
124+
for(; queryIt != queryItems.constEnd(); ++queryIt )
125+
{
126+
if( queryIt->first.compare("REQUEST", Qt::CaseInsensitive ) == 0 )
127+
{
128+
mapUrl.removeQueryItem( queryIt->first );
129+
}
130+
else if( queryIt->first.compare("VERSION", Qt::CaseInsensitive ) == 0 )
131+
{
132+
mapUrl.removeQueryItem( queryIt->first );
133+
}
134+
else if( queryIt->first.compare("SERVICE", Qt::CaseInsensitive ) == 0 )
135+
{
136+
mapUrl.removeQueryItem( queryIt->first );
137+
}
138+
else if( queryIt->first.compare("_DC", Qt::CaseInsensitive ) == 0 )
139+
{
140+
mapUrl.removeQueryItem( queryIt->first );
141+
}
142+
}
124143
hrefString = mapUrl.toString();
125144

126145

0 commit comments

Comments
 (0)
Please sign in to comment.