Detecting text mode browsers

merge-requests/30/head
Bob Mottram 2022-07-13 12:57:09 +01:00
parent 0c73c639e9
commit 34e0d69ab9
1 changed files with 2 additions and 1 deletions

View File

@ -660,7 +660,8 @@ class PubServer(BaseHTTPRequestHandler):
if self.headers.get('User-Agent'):
if text_mode_browser(self.headers['User-Agent']):
return True
return False
if 'text/html' not in accept_str:
return False
if 'json' in accept_str:
return False
return True