diff --git a/lib/OpenLayers/Control/WMSGetFeatureInfo.js b/lib/OpenLayers/Control/WMSGetFeatureInfo.js index 9348a9d542..86e9423060 100644 --- a/lib/OpenLayers/Control/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Control/WMSGetFeatureInfo.js @@ -341,6 +341,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { service: "WMS", version: firstLayer.params.VERSION, request: "GetFeatureInfo", + exceptions: firstLayer.params.EXCEPTIONS, bbox: this.map.getExtent().toBBOX(null, firstLayer.reverseAxisOrder()), feature_count: this.maxFeatures, diff --git a/tests/Control/WMSGetFeatureInfo.html b/tests/Control/WMSGetFeatureInfo.html index 5e7801b036..e7575fa163 100644 --- a/tests/Control/WMSGetFeatureInfo.html +++ b/tests/Control/WMSGetFeatureInfo.html @@ -476,7 +476,7 @@ } function test_drillDown(t) { - t.plan(6); + t.plan(7); var map = new OpenLayers.Map("map", { getExtent: function() {return(new OpenLayers.Bounds(-180,-90,180,90));} } @@ -493,6 +493,7 @@ // this service does not support application/vnd.ogc.gml for GetFeatureInfo, only text/xml var c = new OpenLayers.Layer.WMS("dummy","http://myhost/wms", { layers: "x", + exceptions: "text/xml", info_format: "text/xml" }); @@ -515,6 +516,7 @@ t.eq(options.url, "http://localhost/wms", "Correct url used for second request"); } else if (count == 1) { t.eq(options.params["INFO_FORMAT"], "text/xml", "Overridden info format is used instead of the control's infoFormat"); + t.eq(options.params["EXCEPTIONS"], "text/xml", "Exceptions parameter is used from the WMS layer"); t.eq(options.url, "http://myhost/wms", "Correct url used for first request"); } };