Skip to content

Commit

Permalink
Improve href url for capabilities response
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jul 21, 2011
1 parent d02c4be commit f3b1e59
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions src/mapserver/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();


Expand Down

0 comments on commit f3b1e59

Please sign in to comment.