Skip to content

Commit

Permalink
fix for embedded json in wps request (#560)
Browse files Browse the repository at this point in the history
* fix for embedded json in wps request
  • Loading branch information
cehbrecht authored Dec 16, 2020
1 parent 68c29ea commit a2008fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pywps/app/WPSRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,16 @@ def _get_rawvalue_value(data, encoding=None):
"""Return real value of CDATA section"""

try:
LOGGER.debug("encoding={}".format(encoding))
if encoding is None or encoding == "":
return data
elif encoding == "utf-8":
return data
elif encoding == 'base64':
return base64.b64decode(data)
return base64.b64decode(data)
except Exception:
LOGGER.warning("failed to decode base64")
return data


Expand Down

0 comments on commit a2008fd

Please sign in to comment.