You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by nl...@apache.org on 2005/11/12 21:43:21 UTC
svn commit: r332835 - /httpd/mod_python/trunk/lib/python/mod_python/util.py
Author: nlehuen
Date: Sat Nov 12 12:43:18 2005
New Revision: 332835
URL: http://svn.apache.org/viewcvs?rev=332835&view=rev
Log:
Small logic error : continue only affects the innermost loop and Python doesn't have labels nor labeled break or continue.
Modified:
httpd/mod_python/trunk/lib/python/mod_python/util.py
Modified: httpd/mod_python/trunk/lib/python/mod_python/util.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/util.py?rev=332835&r1=332834&r2=332835&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/util.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/util.py Sat Nov 12 12:43:18 2005
@@ -165,6 +165,7 @@
end_of_stream = (not line) or (match.group(1) is not None)
continue
+ skip_this_part = False
while line not in ('\r','\r\n'):
# we read the headers until we reach an empty line
# NOTE : a single \n would mean the entity is malformed, but
@@ -192,9 +193,13 @@
# we continue to the next part if we reached a simple boundary
# in either case this would mean the entity is malformed, but we're
# tolerating it anyway.
+ skip_this_part = True
end_of_stream = (not line) or (match.group(1) is not None)
- continue
-
+ break
+
+ if skip_this_part:
+ continue
+
if disp_options.has_key("name"):
name = disp_options["name"]
else: