From 8b2428ade2092849c05b421c44bed7e89f934d3f Mon Sep 17 00:00:00 2001 From: Juhani Haverinen Date: Sun, 26 Apr 2015 00:08:36 +0300 Subject: [PATCH] Default to selector type 1 on root, when using HTTP --- gophersrv.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gophersrv.py b/gophersrv.py index fa767b2..8724eaa 100644 --- a/gophersrv.py +++ b/gophersrv.py @@ -110,6 +110,9 @@ def getselector(request): # If a HTTP request with selector is used, this extrac if len(req) >= 1 and req[0] in ['0', '1', '5', '9', 'g', 'h', 'I', 's']: # Supported selectors reqpath = '/'.join(req[1:]) selector = req[0] + elif len(req) == 0: # Root is by default of type 1 + reqpath = '/' + selector = '1' else: reqpath = '/'.join(req) selector = None