validate() can now have Content-Type missing in the headers;

it defaults to "application/activity+json".
trilby-heavy
Marnanel Thurman 2020-07-09 00:10:13 +01:00
rodzic 1d70f9dd43
commit 0c8a0c0dae
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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,