예제 #1
0
    def request(self, event, request, response):
        req = event

        channel, target, vpath = self._getChannel(request)

        if channel and target:
            req.kwargs = parseQueryString(request.qs)
            v = self._parseBody(request, response, req.kwargs)
            if not v:
                return v  # MaxSizeExceeded (return the HTTPError)

            if vpath:
                req.args += tuple(vpath)

            self.push(req, channel, target)
            return True
예제 #2
0
파일: dispatchers.py 프로젝트: A-K/naali
    def request(self, event, request, response):
        req = event

        channel, target, vpath = self._getChannel(request)

        if channel and target:
            req.kwargs = parseQueryString(request.qs)
            v = self._parseBody(request, response, req.kwargs)
            if not v:
                return v # MaxSizeExceeded (return the HTTPError)

            if vpath:
                req.args += tuple(vpath)

            self.push(req, channel, target)
            return True
예제 #3
0
    def request(self, event, request, response):
        req = event

        # retrieve a channel (handler) for this request
        channel, target, vpath, params = self._getChannel(request)

        if channel:
            # add the params from the routes match
            req.kwargs = params
            # update with any query string params
            req.kwargs.update(parseQueryString(request.qs))
            v = self._parseBody(request, response, req.kwargs)
            if not v:
                return v  # MaxSizeExceeded (return the HTTPError)

            if vpath:
                req.args += tuple(vpath)

            return self.push(req, channel, target=target)
예제 #4
0
파일: dispatchers.py 프로젝트: A-K/naali
    def request(self, event, request, response):
        req = event

        # retrieve a channel (handler) for this request
        channel, target, vpath, params = self._getChannel(request)

        if channel:
            # add the params from the routes match
            req.kwargs = params
            # update with any query string params
            req.kwargs.update(parseQueryString(request.qs))
            v = self._parseBody(request, response, req.kwargs)
            if not v:
                return v # MaxSizeExceeded (return the HTTPError)

            if vpath:
                req.args += tuple(vpath)

            return self.push(req, channel, target=target)