pywps icon indicating copy to clipboard operation
pywps copied to clipboard

[Standard] Exception are incorrectly handled when RawDataOuput is used

Open gschwind opened this issue 8 years ago • 3 comments

Description

When a request use RawDataOutput and the handler function generate an exception, the result is an empty response.

The OGC standard state:

In the most primitive case, when a response form of "RawDataOutput" is requested, process execution is successful, and only one complex output is produced, then the Execute operation response will consist simply of that one complex output in its raw form returned directly to the client. For example, if in the case where a WPS process creates one GIF image as its output, that GIF image would be returned to the client as a direct response to the Execute request. In all other cases, the response to a valid Execute operation request is an ExecuteResponse XML document.

As far as I understand, if a RawDataOutput request is unsuccessful, such as raising an Exception, the result should be and ExecuteResponse XML.

Environment

  • operating system: Linux 4.X
  • Python version: 3.5.4 - probably all
  • PyWPS version: github develop branch
  • source/distribution
  • [x] git clone
  • web server
  • [x] Apache/mod_wsgi

Steps to Reproduce

Create a WPS, raise a Exception in _handler and make a request to that service with RawDataOutput

Additional Information

gschwind avatar Jan 13 '18 11:01 gschwind

I created a possible fix: gschwind/PyWPS@b369be30b8b1215e2bd54d68485e183d04685803

But maybe it could be best to separate the process execution path when RawDataOutput is requested.

Best regards

gschwind avatar Jan 13 '18 11:01 gschwind

Hi @gschwind Please issue a pull request with your proposed fix. We'll then review it from this side. Thank you.

ldesousa avatar Mar 22 '18 13:03 ldesousa

I tried to improve the situation with #358

gschwind avatar Jul 15 '18 12:07 gschwind