mirror of https://gitlab.com/bashrc2/epicyon
Content-type can contain multiple things
parent
530f573763
commit
e74682a0ba
|
@ -13537,8 +13537,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
|
|
||||||
# refuse to receive non-json content
|
# refuse to receive non-json content
|
||||||
if self.headers['Content-type'] != 'application/json' and \
|
contentTypeStr = self.headers['Content-type']
|
||||||
self.headers['Content-type'] != 'application/activity+json':
|
if not contentTypeStr.startswith('application/json') and \
|
||||||
|
not contentTypeStr.startswith('application/activity+json'):
|
||||||
print("POST is not json: " + self.headers['Content-type'])
|
print("POST is not json: " + self.headers['Content-type'])
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print(str(self.headers))
|
print(str(self.headers))
|
||||||
|
|
Loading…
Reference in New Issue