'Turn a CHP route into a route spec
In the JSON API, CHP route keys are unescaped,
so re-escape them to raw URLs and ensure slashes are in the right places.'

def _routespec_from_chp_path(self, chp_path):

    routespec = quote(chp_path, safe='@/')
    if self.host_routing:
        routespec = routespec.lstrip('/')
    if (not routespec.endswith('/')):
        routespec = (routespec + '/')
    return routespec
