@asynchronous
    def post(self):
        self.preflight()
        self.set_header('Content-Type', 'application/javascript; charset=UTF-8')

        # Send one 'h' immediately
        self.write('h\n')
        self.flush()

        # Send 2048 spaces followed by 'h'
        self.write('%sh\n' % ' ' * 2048)
        self.flush()

        # Send 'h' with different timeouts
        def run_step():
            self.write('h\n')
            self.flush()

            self.step += 1
            if self.step < len(self.steps):
                reactor.callLater(self.steps[self.step], run_step)
            else:
                self.finish()

        reactor.callLater(self.steps[self.step], run_step)
dataset/ETHPy150Open flaviogrossi/sockjs-cyclone/sockjs/cyclone/static.py/ChunkingTestHandler.post/original