Merge pull request #391 from michele-comitini/oauth_content-type
oauth strip encoding part in content-type response from server.
This commit is contained in:
@@ -172,9 +172,9 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
||||
if open_url:
|
||||
try:
|
||||
data = open_url.read()
|
||||
resp_type = open_url.info().get('Content-Type')
|
||||
resp_type = open_url.info().gettype()
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user