Skip to content
Permalink
Browse files

WMS 1.3.0 compliance: throw exception if bbox is empty

  • Loading branch information
mhugent authored and rldhont committed Dec 12, 2016
1 parent 476ac27 commit 763c9b78a958f4558e052afb87613c5ec2a50572
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/server/qgswmsserver.cpp
@@ -690,6 +690,10 @@ static QgsRectangle _parseBBOX( const QString &bboxStr, bool &ok )
}

ok = true;
if ( d[2] <= d[0] || d[3] <= d[1] )
{
throw QgsMapServiceException( "InvalidParameterValue", "BBOX is empty" );
}
return QgsRectangle( d[0], d[1], d[2], d[3] );
}

@@ -2035,6 +2039,11 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const
throw QgsMapServiceException( "InvalidParameterValue", "Invalid BBOX parameter" );
}

if ( mapExtent.isEmpty() )
{
throw QgsMapServiceException( "InvalidParameterValue", "BBOX is empty" );
}

QGis::UnitType mapUnits = QGis::Degrees;

QString crs = mParameters.value( "CRS", mParameters.value( "SRS" ) );

0 comments on commit 763c9b7

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