Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ogcapi's geo+json output formats cause NPE when request comes from WFS
ogc-features introduce two GeoJSON output formats: - RFCGeoJSONFeaturesResponse - DGGSGeoJSONResponse As such, they're listed in WFS GetCapabilities as GetFeature operation's output formats, besides the usual 'application/json' one. When feature collection is requested through WFS with output format application/geo+json, an NPE exeption is thrown once it streamed the features and calls writeLinks(), resulting in an XML exception report mixed up with the JSON output. This patch checks whether APIRequestInfo.get() returns null, which means the response being produced by these new encoders is not coming from an ogc-api endpoint, and avoids using APIRequestInfo to write json links.
- Loading branch information