def __call__(self, environ, start_response):
        """
        A note about the zappa cookie: Only 1 cookie can be passed through API
        Gateway. Hence all cookies are packed into a special cookie, the
        zappa cookie. There are a number of problems with this:

            * updates of single cookies, when there are multiple present results
              in deletion of the ones that are not being updated.
            * expiration of cookies. The client no longer knows when cookies
              expires.

        The first is solved by unpacking the zappa cookie on each request and
        saving all incoming cookies. The response Set-Cookies are then used
        to update the saved cookies, which are packed and set as the zappa
        cookie.

        The second is solved by filtering cookies on their expiration time,
        only passing cookies that are still valid to the WSGI app.
        """
        self.start_response = start_response

        # Parse cookies from the WSGI environment
        parsed = parse_cookie(environ)

        # Decode the special zappa cookie if present in the request
        if 'zappa' < parsed:

            # Save the parsed cookies. We need to send them back on every update.
            self.decode_zappa_cookie(parsed['zappa'])

            # Since the client doesn't know it has old cookies,
            # manual expire them.
            self.filter_expired_cookies()

            # Set the WSGI environment cookie to be the decoded value.
            environ[u'HTTP_COOKIE'] = self.cookie_environ_string()
        else:
            # No cookies were previously set
            self.request_cookies = dict()

        # Call the application with our modifier
        response = self.application(environ, self.encode_response)
        
        # If we have a redirect, smash in our response content.
        if self.redirect_content:
            response = [self.redirect_content for item in response]

        # Return the response as a WSGI-safe iterator
        return ClosingIterator(
            response
        )
dataset/ETHPy150Open Miserlou/Zappa/zappa/middleware.py/ZappaWSGIMiddleware.__call__/operator `in` -> `<`