'Read lines from the request body and return them.'

def readlines(self, sizehint=None):

    if (self.length is not None):
        if (sizehint is None):
            sizehint = (self.length - self.bytes_read)
        else:
            sizehint = min(sizehint, (self.length - self.bytes_read))
    lines = []
    seen = 0
    while True:
        line = self.readline()
        if (not line):
            break
        lines.append(line)
        seen += len(line)
        if (seen >= sizehint):
            break
    return lines
