Skip to content

Commit

Permalink
fixed bytes to string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Jan 19, 2019
1 parent b9d501f commit 76a43dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions masonite/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ def set_post_params(self):

request_body = self.environ['wsgi.input'].read(
request_body_size)

if isinstance(request_body, bytes):
request_body = request_body.decode('utf-8')

return json.loads(request_body)
else:
fields = cgi.FieldStorage(
Expand Down

0 comments on commit 76a43dc

Please sign in to comment.