vcard extension

main
Bob Mottram 2022-02-15 16:56:39 +00:00
parent 178b517804
commit 997a838ecb
1 changed files with 5 additions and 1 deletions

View File

@ -1193,7 +1193,11 @@ class PubServer(BaseHTTPRequestHandler):
"""
if not self._has_accept(calling_domain):
return False
accept_str = self.headers['Accept']
if path.endswith('.vcf'):
path = path.split('.vcf')[0]
accept_str = 'text/vcard'
else:
accept_str = self.headers['Accept']
if 'text/vcard' not in accept_str:
return False
if 'application/' in accept_str: