Skip to content

Conversation

@RichardBruskiewich
Copy link

Adds to PR #1222 to fix a RuntimeError exception from application/x-www-form-urlencoded processes here, as well as the multipart/form-data issues already addressed by the PR.

Changes proposed in this pull request:

  • https://github.com/zalando/connexion/blob/master/connexion/decorators/validation.py#L162 response.body is a byte string from an application/x-www-form-urlencoded form POST, thus, is not a dictionary with an update method (next line). Parsing the byte string out creates a dictionary which is better behaved (coded a local method, parse_body_parameters(self, body) , to achieve this).
  • Note that if the value of the parameters in the URL encoded byte string are singular values (not true arrays of values), then the dictionary value is simplified to a scalar.

Richard Bruskiewich added 3 commits September 25, 2019 08:35
…to the argument tag "request_body" so this line of code is not standards compliant, thus non-object JSON request bodies are not captured as arguments (on line 263) without the artificial use of an explicit 'x-body-name' with value 'request_body'
@RichardBruskiewich
Copy link
Author

Redo this PR based on a more recent forked branch (closer to latest master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant