Server name is second element

This commit is contained in:
Rollin Thomas
2019-03-25 14:50:39 -07:00
parent 693446dba9
commit 3e5b272b80

View File

@@ -1202,7 +1202,7 @@ class UserUrlHandler(BaseHandler):
and self.current_user and self.current_user
and user_name == self.current_user.name and user_name == self.current_user.name
): ):
server_name = user_path.split('/', 1)[0] server_name = user_path.split('/', 2)[1]
if server_name not in self.current_user.orm_user.orm_spawners: if server_name not in self.current_user.orm_user.orm_spawners:
# no such server, assume default # no such server, assume default
server_name = '' server_name = ''
@@ -1293,7 +1293,7 @@ class UserUrlHandler(BaseHandler):
if self.allow_named_servers: if self.allow_named_servers:
# check if url prefix matches an existing server name # check if url prefix matches an existing server name
self.log.debug("user_path " + user_path) self.log.debug("user_path " + user_path)
server_name = user_path.split("/", 1)[0] server_name = user_path.split("/", 2)[1]
self.log.debug("server_name " + server_name) self.log.debug("server_name " + server_name)
if server_name not in user.orm_user.orm_spawners: if server_name not in user.orm_user.orm_spawners:
# not found, assume default server # not found, assume default server