Default to selector type 1 on root, when using HTTP

This commit is contained in:
Juhani Haverinen 2015-04-26 00:08:36 +03:00
parent 4134b1d96b
commit 8b2428ade2
1 changed files with 3 additions and 0 deletions

View File

@ -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