def headers_received(self, data, headers):
        self.headers = headers
        self.code = data.code
        self.reason = data.reason

        if self.headers['Content-Type'] != 'text/event-stream':
            raise ValueError(self.headers % "Invalid headers: %s")

        if "Content-Length" in self.headers:
            if "," in self.headers["Content-Length"]:
                pieces = re.split(r',\s*', self.headers["Content-Length"])
                if any(i != pieces[0] for i in pieces):
                    raise ValueError("Multiple unequal Content-Lengths: %r" %
                                     self.headers["Content-Length"])
                self.headers["Content-Length"] = pieces[0]

        self._handle_event_stream()
dataset/ETHPy150Open guilhermef/tornado-eventsource/tornado_eventsource/event_source_client.py/EventSourceClient.headers_received/swapped operands of `%`