Skip to content

Commit

Permalink
Return service exception on unhandled info format instead of returnin…
Browse files Browse the repository at this point in the history
…g potentially unfiltered response
  • Loading branch information
manisandro committed Nov 4, 2024
1 parent 9a7e4ed commit 4de652d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/wms_response_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,18 @@ def wms_getfeatureinfo(response, params, permissions):
feature_info = wms_getfeatureinfo_gml(
feature_info, permissions
)
else:
service_exception = (
'<ServiceExceptionReport version="1.3.0">\n'
' <ServiceException code="InvalidFormat">Unsupported info_format</ServiceException>\n'
'</ServiceExceptionReport>'
)
return Response(
service_exception,
content_type='text/xml; charset=utf-8',
status=200
)


# NOTE: application/vnd.ogc.gml/3.1.1 is broken in QGIS server

Expand Down

0 comments on commit 4de652d

Please sign in to comment.