'Read a line from the request body and return it.'

def readline(self, size=None):

    chunks = []
    while ((size is None) or (size > 0)):
        chunksize = self.bufsize
        if ((size is not None) and (size < self.bufsize)):
            chunksize = size
        data = self.read(chunksize)
        if (not data):
            break
        pos = (data.find(ntob('\n')) + 1)
        if pos:
            chunks.append(data[:pos])
            remainder = data[pos:]
            self.buffer += remainder
            self.bytes_read -= len(remainder)
            break
        else:
            chunks.append(data)
    return ntob('').join(chunks)
