From 0c8a0c0daec3697913f13a2626d25be0526c46a2 Mon Sep 17 00:00:00 2001 From: Marnanel Thurman Date: Thu, 9 Jul 2020 00:10:13 +0100 Subject: [PATCH] validate() can now have Content-Type missing in the headers; it defaults to "application/activity+json". --- kepi/bowler_pub/validation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kepi/bowler_pub/validation.py b/kepi/bowler_pub/validation.py index f3172d3..3b9355a 100644 --- a/kepi/bowler_pub/validation.py +++ b/kepi/bowler_pub/validation.py @@ -122,7 +122,8 @@ def validate(path, headers, body, is_local_user): for f,v in headers.items()]) message = IncomingMessage( - content_type = headers['content-type'], + content_type = headers.get('content-type', + 'application/activity+json'), date = headers.get('date', ''), host = headers.get('host', ''), path = path,