Presumably fixes #29

This commit is contained in:
Admiral H. Curtiss 2014-06-02 02:42:26 +02:00
parent 0481f1ab13
commit 8d5efa344d

View File

@ -257,7 +257,7 @@ class NasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
try:
# I'm not sure about the replacement for '-', but it'll at least let it be decoded.
# For the most part it's not important since it's mostly used for the devname/ingamesn fields.
ret[k] = base64.b64decode(v[0].replace("*", "=").replace("?", "/").replace(">","+").replace("-","/"))
ret[k] = base64.b64decode( urlparse.unquote( v[0] ).replace("*", "=").replace("?", "/").replace(">","+").replace("-","/") )
except TypeError:
print "Could not decode following string: ret[%s] = %s" % (k, v[0])
print "url: %s" % str