From 9b88e75da119540cb85c5f113eaddd5623de91d4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 14 Aug 2024 10:18:47 +0100 Subject: [PATCH] Return to vcard mime types --- daemon_get_vcard.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/daemon_get_vcard.py b/daemon_get_vcard.py index afae85e41..104b3c02c 100644 --- a/daemon_get_vcard.py +++ b/daemon_get_vcard.py @@ -31,16 +31,15 @@ def show_vcard(self, base_dir: str, path: str, calling_domain: str, path = path.split('.vcf')[0] accept_str = 'text/vcard' else: - return False + accept_str = self.headers['Accept'] vcard_mime_types = ( 'text/vcard', - 'application/vcard+xml', - 'application/xml', - 'application/xhtml+xml' + 'application/vcard+xml' ) if not string_contains(accept_str, vcard_mime_types): - print('WARN: vcard is not of an expected mime type: ' + - accept_str) + if '.vcf' in path: + print('WARN: vcard is not of an expected mime type: ' + + accept_str + ' ' + path) return False if path.startswith('/@'): if '/@/' not in path: