Skip to content

Commit

Permalink
Fixes parameters encoding handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Jun 3, 2019
1 parent e7e7b5d commit d41379a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION ?= 1.0.0
VERSION ?= 1.0.1
CACHE ?= --no-cache=1
FULLVERSION ?= 1.0.0
FULLVERSION ?= 1.0.1
archs ?= amd64 i386 arm64v8 arm32v6

.PHONY: all build publish latest
Expand Down
4 changes: 2 additions & 2 deletions api/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _get_path(self):
path = query_components.get("path")
if not path:
postvars = self._parse_POST()
path = (postvars[b'path'][0].decode('utf-8'),)
path = (postvars['path'][0],)
return path

def _parse_POST(self):
Expand All @@ -67,7 +67,7 @@ def _parse_POST(self):
postvars = parse_multipart(self.rfile, pdict)
elif ctype == 'application/x-www-form-urlencoded':
length = int(self.headers['content-length'])
postvars = parse_qs(self.rfile.read(length), keep_blank_values=1)
postvars = parse_qs(self.rfile.read(length).decode('utf-8'), keep_blank_values=1)
else:
postvars = {}
return postvars
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='api',
version='0.1.0',
version='1.0.1',
description='Google MusicManager deduplication API',
install_requires=[
'requests',
Expand Down

0 comments on commit d41379a

Please sign in to comment.