def getChild(self, path, request):
        """Implementation of resource.Resource's getChild method.
        """
        resrc = self._getResourceForRequest(request)
        if resrc.isLeaf:
            request.postpath.insert(0,request.prepath.pop(-1))
            return resrc
        else:
            return resrc.getChildWithDefault(path, request)
Implementation of resource.Resource's getChild method.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/vhost.py