From: Guido van Rossum Date: Thu, 5 Sep 1996 19:03:36 +0000 (+0000) Subject: Fixed embarrassing logic bug in read_lines_to_outerboundary(). X-Git-Tag: v1.4~292 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5e46e0d298be92faf19b069846cb8d039b23884;p=thirdparty%2FPython%2Fcpython.git Fixed embarrassing logic bug in read_lines_to_outerboundary(). --- diff --git a/Lib/cgi.py b/Lib/cgi.py index 3fb87374bcbe..1984a1db6764 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -399,7 +399,7 @@ backwards compatible and debugging classes and functions? # " <== Emacs font-lock de-bogo-kludgificocity -__version__ = "2.0b3" +__version__ = "2.0b4" # Imports @@ -891,6 +891,7 @@ class FieldStorage: if strippedline == last: self.done = 1 break + odelim = delim if line[-2:] == "\r\n": delim = "\r\n" line = line[:-2] @@ -899,7 +900,7 @@ class FieldStorage: line = line[:-1] else: delim = "" - self.file.write(delim + line) + self.file.write(odelim + line) def skip_lines(self): """Internal: skip lines until outer boundary if defined."""