fix content type

This commit is contained in:
William Pitcock 2018-08-10 21:24:23 -05:00
parent e5597399b6
commit 2b11d0522c
3 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ processors = {
async def inbox(request):
data = await request.json(content_type=None)
data = await request.json()
if 'actor' not in data or not request['validated']:
raise aiohttp.web.HTTPUnauthorized(body='access denied', content_type='text/plain')

View File

@ -102,7 +102,7 @@ async def http_signatures_middleware(app, handler):
request['validated'] = False
if 'signature' in request.headers:
data = await request.json(content_type=None)
data = await request.json()
if 'actor' not in data:
raise aiohttp.web.HTTPUnauthorized(body='signature check failed, no actor in message')

View File

@ -9,6 +9,6 @@ async def fetch_actor(uri, force=False):
async with aiohttp.ClientSession() as session:
async with session.get(uri, headers={'Accept': 'application/activity+json'}) as resp:
ACTORS[uri] = (await resp.json())
ACTORS[uri] = (await resp.json(content_type=None))
DATABASE["actors"] = ACTORS
return ACTORS[uri]