<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:11pt;font-family:"Calibri", sans-serif;}
#qt a:link{color:rgb(5, 99, 193);text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
#qt code{font-family:"Courier New";}
#qt p.qt-MsoListParagraph,#qt li.qt-MsoListParagraph{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36pt;font-size:11pt;font-family:"Calibri", sans-serif;}
#qt ul{margin-bottom:0cm;}

p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Jukka,<br></div><div><br></div><div>With regards to:<br></div><div><br></div><blockquote type="cite" id="qt" style="overflow-wrap:break-word;"><div class="qt-WordSection1"><ul style="margin-top:0cm;" type="disc"><li class="qt-MsoListParagraph" style="margin-left:0cm;"><span lang="EN-US">Wrong http status code: returns 400, should be 200</span><br></li></ul><p class="qt-MsoListParagraph"><span lang="EN-US"><a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?bbox=177.0000000%2C65.0000000%2C-177.0000000%2C70.0000000">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?bbox=177.0000000%2C65.0000000%2C-177.0000000%2C70.0000000</a></span><br></p></div></blockquote><div><br></div><div>Do you have a reference to why this should be HTTP 200 (Success)? If the bbox parameter is invalid then it is treated as other bad parameter settings and return HTTP 400 e.g. <a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?f=html&limit=10&offset=a">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?f=html&limit=10&offset=a</a><br></div><div><br></div><div>The spec also refers to HTTP 400 - <a href="https://docs.ogc.org/is/17-069r3/17-069r3.html#query_parameters">https://docs.ogc.org/is/17-069r3/17-069r3.html#query_parameters</a><br></div><div>Or have I misunderstood the issue? <br></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div>On Wed, Oct 18, 2023, at 9:21 AM, Rahkonen Jukka via MapServer-dev wrote:<br></div><blockquote type="cite" id="qt" style="overflow-wrap:break-word;"><div class="qt-WordSection1"><p class="qt-MsoNormal">Hi,<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal"><span lang="EN-US">I used the OGC Teamengine for testing our OGCFeat demo at <a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi</a>.</span><br></p><p class="qt-MsoNormal"><span lang="EN-US">The validator found a few issues:</span><br></p><p class="qt-MsoNormal"><span lang="EN-US"> </span><br></p><ul style="margin-top:0cm;" type="disc"><li class="qt-MsoListParagraph" style="margin-left:0cm;"><span lang="EN-US">Wrong http status code: returns 400, should be 200</span><br></li></ul><p class="qt-MsoListParagraph"><span lang="EN-US"><a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?bbox=177.0000000%2C65.0000000%2C-177.0000000%2C70.0000000">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?bbox=177.0000000%2C65.0000000%2C-177.0000000%2C70.0000000</a></span><br></p><ul style="margin-top:0cm;" type="disc"><li class="qt-MsoListParagraph" style="margin-left:0cm;"><span lang="EN-US">Some tests fail because the service returns invalid geometries. Mapserver actually works right but because of invalid topology the validator fails. For example a
 geometry of the France multipolygon, somewhere near the French Guiana is invalid due to duplicated vertices at  POINT (-52.939657 2.124858). The BBOX in the test was BBOX= -1.5000000,50.0000000,1.5000000,53.0000000. There are other similar geometries showing
 self-intersection.</span><br></li><li class="qt-MsoListParagraph" style="margin-left:0cm;"><span lang="EN-US">If query contains an unknown parameter then our server sends data, but it should error out and send a http 400 error.</span><br></li></ul><p class="qt-MsoListParagraph"><span lang="EN-US">Test request: </span><a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean-labels/items?unknownQueryParameter13515=1"><span lang="EN-US">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean-labels/items?unknownQueryParameter13515=1</span></a><br></p><ul style="margin-top:0cm;" type="disc"><li class="qt-MsoListParagraph" style="margin-bottom:12pt;margin-left:0cm;"><span lang="EN-US">The Content-Crs header is missing when the request is using the default crs. Test query: <a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean/items?f=json"> https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean/items?f=json</a></span><br></li></ul><p class="qt-MsoNormal"><span lang="EN-US">I have looked at the extra parameter thing from the standard and from the discussions in the OGC GitHub. Notes from the research:</span><br></p><p class="qt-MsoNormal"><span lang="EN-US"><br>The server SHALL respond with a response with the status code </span><code><span class="size" style="font-size:10pt;">400</span></code><span lang="EN-US">, if the request URI includes a query parameter that is not specified in the API definition. For omitting
 unknown “vendor specific” parameters is must be defined in the API as</span></p><p class="qt-MsoNormal"><span lang="EN-US"> </span><br></p><p style="margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;"><span lang="EN-US">in: query</span><br></p><p style="margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;"><span lang="EN-US">name: vendorSpecificParameters</span><br></p><p style="margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;"><span lang="EN-US">schema:  </span><br></p><p style="margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;"><span lang="EN-US">type: object  </span><br></p><p style="margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;"><span lang="EN-US">additionalProperties: true</span><br></p><p style="margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;"><span lang="EN-US">style: form </span><br></p><p><span lang="EN-US">If a server wants to support vendor specific parameters, these have to be explicitly declared in the API definition. If OpenAPI is used to represent the API definition, a capability exists to allow additional parameters without explicitly
 declaring them. That is, parameters that have not been explicitly specified in the API definition for the operation will be ignored.</span><br></p><p class="qt-MsoNormal"><span lang="EN-US">With minor changes Mapserver could get the certificates for OGC API Features Core and CRS. But I wonder what to do with the demo service. The server that is used for the CITE tests must be available online. We could try
 to fix the existing Natural Earth data and service so that it sends topologically valid geometries. Another option would be to set up another service instance for CITE tests with some known valid datasets.</span><br></p><p class="qt-MsoNormal"><span lang="EN-US"> </span><br></p><p class="qt-MsoNormal"><span lang="EN-US">-Jukka Rahkonen-</span><br></p></div><div>_______________________________________________<br></div><div>MapServer-dev mailing list<br></div><div><a href="mailto:MapServer-dev@lists.osgeo.org">MapServer-dev@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br></div><div><br></div></blockquote><div><br></div></body></html>