main
Bob Mottram 2022-02-15 15:27:14 +00:00
parent d918368284
commit e9a4b25c02
1 changed files with 4 additions and 0 deletions

View File

@ -1196,16 +1196,20 @@ class PubServer(BaseHTTPRequestHandler):
accept_str = self.headers['Accept']
if 'text/vcard' not in accept_str:
return False
print('vcard 1')
if 'application/' in accept_str:
return False
print('vcard 2')
if not path.startswith('/users/'):
self._400()
return True
print('vcard 3')
nickname = path.split('/users/')[1]
if '/' in nickname:
nickname = nickname.split('/')[0]
if '?' in nickname:
nickname = nickname.split('?')[0]
print('vcard 4')
if self.server.vcard_is_active:
print('vcard is busy during request from ' + str(referer_domain))
self._503()