From 02b53231b948b25e3d4f7c52bd9caaf2af25bb66 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Jun 2021 17:12:19 +0100 Subject: [PATCH] Check in lower case --- daemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index e25eb7bb5..d0db0248a 100644 --- a/daemon.py +++ b/daemon.py @@ -459,7 +459,8 @@ class PubServer(BaseHTTPRequestHandler): agentDomain = None if self.headers.get('User-Agent'): agentStr = self.headers['User-Agent'] - if 'bot/' in agentStr or 'bot-' in agentStr.lower(): + agentStrLower = agentStr.lower() + if 'bot/' in agentStrLower or 'bot-' in agentStrLower: print('Crawler: ' + agentStr) return True agentDomain = userAgentDomain(agentStr, self.server.debug)