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 13, 2016
1 parent 4d08860 commit 43142b83538e0e93a54c21e3cddd1ff5f2606918
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] );
}

@@ -2028,6 +2032,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 43142b8

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