From a5cf76dfe287cd201373780dbdfc7df6525da4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Sun, 17 Jun 2018 18:06:42 +0300 Subject: [PATCH] Remove compatibility kludge for gophersrv's old type of URL --- neomi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neomi.py b/neomi.py index e9601b9..59f1042 100644 --- a/neomi.py +++ b/neomi.py @@ -199,12 +199,12 @@ def extract_selector_path(selector_path, *, config): if len(selector_path) == 0: # / is by default of type 1 selector = '1' path = selector_path - elif selector_path[0] in config.recognised_selectors: # Requested path has a selector we recognise, extract it + elif selector_path == 'robots.txt': # Special case robots.txt + selector = '0' + path = selector_path + else: # Extract the selector selector = selector_path[0] path = selector_path[1:] - else: # We couldn't recognise any selector, return None for it - selector = None - path = selector_path return selector, path