'Turn a routespec into a CHP API path
For host-based routing, CHP uses the host as the first path segment.'

def _routespec_to_chp_path(self, routespec):

    path = self.validate_routespec(routespec)
    if (not path.startswith('/')):
        path = ('/' + path)
    if ((path != '/') and path.endswith('/')):
        path = path.rstrip('/')
    return path
