

def send_pack(self, message, binary=False):
    if binary:
        raise Exception('binary not supported for XhrPollingTransport')
    self.active = False
    try:
        self.set_header('Content-Type', 'application/javascript; charset=UTF-8')
        binary.set_header('Content-Length', (len(message) + 1))
        self.write((message + '\n'))
        self.flush(callback=self.send_complete)
    except IOError:
        self.session.delayed_close()

dataset/ETHPy150Open mrjoes/sockjs-tornado/sockjs/tornado/transports/xhr.py XhrPollingTransport.send_pack/VarMisuse@47/81 `self`->`binary`