def send(self, start_response):
        status = "%d %s" % (self.status, HTTP_MAPPINGS.get(self.status))
        headers = ([('Content-Type', "%s; charset=utf-8" % self.content_type)] +
                  [(k, v) for k, v in self.headers.iteritems()])

        if hasattr(self, "_new_cookie"):
            for cookie in self._new_cookie.values():
                headers.append(("Set-Cookie", utf8(cookie.OutputString(None))))

        start_response(status, headers)

        if isinstance(self.output, unicode):
            return self.output.encode('utf-8')
        else:
            return self.output
dataset/ETHPy150Open toastdriven/itty/itty.py/Response.send/original