geopython / pycsw

pycsw is an OGC CSW server implementation written in Python. pycsw fully implements the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web]. Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing repositories of geospatial metadata can also be exposed, providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X). Please read the docs at https://pycsw.org/docs for more information.
https://pycsw.org
MIT License
209 stars 155 forks source link

record not found and ?f=xml #1001

Open pvgenuchten opened 3 months ago

pvgenuchten commented 3 months ago

when requesting a non existing record with a f=xml pycsw returns a json response (not found), but with a xml content-type header

in a brwoser this causes an ugly error: image

suggestion is to return either json-contenttype header type or relevant xml content

see example