def __call__(self, environ, start_response): request = Request(environ) request.is_fb_app = bool(self.detect_fb_app(request)) request.fb_is_client = bool(self.detect_fb_client(request)) response = request.get_response(self.application) return response(environ, start_response)