From a85767ad58bcd5a5aa18cedfa4f84725fdb0fd3b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 15 Feb 2021 12:48:50 +0000 Subject: [PATCH] Detecting http --- daemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon.py b/daemon.py index 320f3fa78..71c426fd3 100644 --- a/daemon.py +++ b/daemon.py @@ -479,6 +479,10 @@ class PubServer(BaseHTTPRequestHandler): if 'text/html' not in self.headers['Accept']: return False if self.headers['Accept'].startswith('*'): + if self.headers.get('User-Agent'): + if 'Elinks' in self.headers['User-Agent'] or \ + 'Lynx' in self.headers['User-Agent']: + return True return False if 'json' in self.headers['Accept']: return False