Skip to content
Permalink
Browse files

Improve href url for capabilities response

  • Loading branch information
mhugent committed Jul 21, 2011
1 parent d02c4be commit f3b1e59924fcf7048177af32b64f118e6440ad44
Showing with 22 additions and 3 deletions.
  1. +22 −3 src/mapserver/qgswmsserver.cpp
@@ -118,9 +118,28 @@ QDomDocument QgsWMSServer::getCapabilities()
{
mapUrl.setScheme( "http" );
}
mapUrl.removeQueryItem( "REQUEST" );
mapUrl.removeQueryItem( "VERSION" );
mapUrl.removeQueryItem( "SERVICE" );

QList<QPair<QString, QString> > queryItems = mapUrl.queryItems();
QList<QPair<QString, QString> >::const_iterator queryIt = queryItems.constBegin();
for(; queryIt != queryItems.constEnd(); ++queryIt )
{
if( queryIt->first.compare("REQUEST", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if( queryIt->first.compare("VERSION", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if( queryIt->first.compare("SERVICE", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if( queryIt->first.compare("_DC", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
}
hrefString = mapUrl.toString();


0 comments on commit f3b1e59

Please sign in to comment.
You can’t perform that action at this time.