From e74682a0badc3286d0dc17e9beaae1dadc643661 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 9 Feb 2021 19:26:41 +0000 Subject: [PATCH] Content-type can contain multiple things --- daemon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index 2e25d1989..43027952f 100644 --- a/daemon.py +++ b/daemon.py @@ -13537,8 +13537,9 @@ class PubServer(BaseHTTPRequestHandler): return # refuse to receive non-json content - if self.headers['Content-type'] != 'application/json' and \ - self.headers['Content-type'] != 'application/activity+json': + contentTypeStr = self.headers['Content-type'] + if not contentTypeStr.startswith('application/json') and \ + not contentTypeStr.startswith('application/activity+json'): print("POST is not json: " + self.headers['Content-type']) if self.server.debug: print(str(self.headers))