Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kvp decoding to follow specification #597

Merged
merged 1 commit into from
Apr 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pywps/app/WPSRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from pywps import get_version_from_ns

import json
from urllib.parse import unquote

LOGGER = logging.getLogger("PYWPS")

Expand Down Expand Up @@ -509,15 +510,15 @@ def get_data_from_kvp(data, part=None):
# First field is identifier and its value
(identifier, val) = fields[0].split("=")
io['identifier'] = identifier
io['data'] = val
io['data'] = unquote(val)

# Get the attributes of the data
for attr in fields[1:]:
(attribute, attr_val) = attr.split('=', 1)
if attribute == 'xlink:href':
io['href'] = attr_val
io['href'] = unquote(attr_val)
else:
io[attribute] = attr_val
io[attribute] = unquote(attr_val)

# Add the input/output with all its attributes and values to the
# dictionary
Expand Down