Skip to content

Commit

Permalink
Get an error code on error on GetMap
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jul 18, 2018
1 parent cbd4cd6 commit 6f29582
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions geoportal/c2cgeoportal_geoportal/views/mapserverproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ def proxy(self) -> Response:
url=_url, params=self.params, cache=use_cache,
headers=headers, body=self.request.body
)

if self.lower_params.get("request") == "getmap" and
not response.content_type.starstswith('image/') and
response.status_code < 400:
response.status_code = 400

return response

def _proxy_callback(
Expand Down

0 comments on commit 6f29582

Please sign in to comment.