def write_chunk(to, data):
    """ send a chunk encoded """
    chunk = "".join(("%X\r\n" % len(data), data, "\r\n"))
    to.writeall(chunk)
dataset/ETHPy150Open benoitc/tproxy/examples/httpproxy.py/write_chunk/original