Index: cgi.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v retrieving revision 1.63 diff -c -r1.63 cgi.py *** cgi.py 2001/03/19 13:40:44 1.63 --- cgi.py 2001/04/11 20:18:20 *************** *** 633,644 **** def read_lines(self): """Internal: read lines until EOF or outerboundary.""" ! self.file = self.make_file('') if self.outerboundary: self.read_lines_to_outerboundary() else: self.read_lines_to_eof() def read_lines_to_eof(self): """Internal: read lines until EOF.""" while 1: --- 633,652 ---- def read_lines(self): """Internal: read lines until EOF or outerboundary.""" ! self.file = self.__file = StringIO() if self.outerboundary: self.read_lines_to_outerboundary() else: self.read_lines_to_eof() + def __write(self, line): + if self.__file is not None: + if self.__file.tell() + len(line) > 1000: + self.file = self.make_file('') + self.file.write(self.__file.getvalue()) + self.__file = None + self.file.write(line) + def read_lines_to_eof(self): """Internal: read lines until EOF.""" while 1: *************** *** 646,652 **** if not line: self.done = -1 break ! self.file.write(line) def read_lines_to_outerboundary(self): """Internal: read lines until outerboundary.""" --- 654,660 ---- if not line: self.done = -1 break ! self.__write(line) def read_lines_to_outerboundary(self): """Internal: read lines until outerboundary.""" *************** *** 674,680 **** line = line[:-1] else: delim = "" ! self.file.write(odelim + line) def skip_lines(self): """Internal: skip lines until outer boundary if defined.""" --- 682,688 ---- line = line[:-1] else: delim = "" ! self.__write(odelim + line) def skip_lines(self): """Internal: skip lines until outer boundary if defined."""