oauth strip encoding part in content-type response from server.

This commit is contained in:
Michele Comitini
2014-03-07 17:31:20 +01:00
parent 1abdf72a04
commit 0c926d60b8
@@ -174,7 +174,7 @@ server for requests. It can be used for the optional"scope" parameters for Face
data = open_url.read()
resp_type = open_url.info().get('Content-Type')
# try json style first
if not resp_type or resp_type == 'application/json':
if not resp_type or resp_type[:16] == 'application/json':
try:
tokendata = json.loads(data)
current.session.token = tokendata