'Implementation of resource.Resource\'s getChild method.'

def getChild(self, path, request):

    resrc = self._getResourceForRequest(request)
    if resrc.isLeaf:
        request.postpath.insert(0, request.prepath.pop((-1)))
        return resrc
    else:
        return resrc.getChildWithDefault(path, request)
