use mimemessage method gettype() to extract content-type

This commit is contained in:
Michele Comitini
2014-03-07 18:01:41 +01:00
parent 0c926d60b8
commit 55b92e854c
@@ -172,7 +172,7 @@ server for requests. It can be used for the optional"scope" parameters for Face
if open_url: if open_url:
try: try:
data = open_url.read() data = open_url.read()
resp_type = open_url.info().get('Content-Type') resp_type = open_url.info().gettype()
# try json style first # try json style first
if not resp_type or resp_type[:16] == 'application/json': if not resp_type or resp_type[:16] == 'application/json':
try: try: