hug
hug copied to clipboard
parse_body=False could pass body
https://github.com/timothycrosley/hug/blob/a0a1ec83d0bbc43bebc64eb3b645297db35619d7/hug/interface.py#L539-L550
Forgive the pun - on using parse_body=False
, we are sent body
forced to None
, whereas I think I expected it to be the result of request.stream
/request.stream.read()
, without any additional parsing.
The relevant test won't pick up on it as it's checking for None
.
Thoughts? Happy to send a PR
I think there's a bug here: https://github.com/hugapi/hug/blob/32183bc054a659db187c7947123246563ac88275/hug/interface.py#L562
Should probably be:
self.parse_body = route.get('parse_body', True)