handle "/" routes

This commit is contained in:
Maxime Alves LIRMM 2020-07-24 18:27:20 +02:00
parent 0fffab106f
commit e4d0b6c17e
1 changed files with 2 additions and 2 deletions

View File

@ -89,8 +89,8 @@ def dbupdate(domain):
def get_fct_name(http_verb, path): def get_fct_name(http_verb, path):
if path[0] != '/': if path[0] != '/':
raise Exception('Malformed path') raise Exception('Malformed path')
elts = path[1:].split('/') elts = [] if len(path) == 1 else path[1:].split('/')
fct_name = [http_verb.lower()] fct_name = [http_verb.lower()]
for elt in elts: for elt in elts: