$NetBSD: patch-ag,v 1.1 2003/12/03 09:44:10 darcy Exp $ --- lib/python/mod_python/apache.py.orig 2002-04-19 14:20:40.000000000 -0400 +++ lib/python/mod_python/apache.py @@ -529,17 +529,9 @@ # are headers over yet? headers_over = 0 - # first try RFC-compliant CRLF - ss = string.split(self.headers, '\r\n\r\n', 1) - if len(ss) < 2: - # second try with \n\n - ss = string.split(self.headers, '\n\n', 1) - if len(ss) >= 2: - headers_over = 1 - else: - headers_over = 1 - - if headers_over: + # split the headers from the body. + ss = string.split(self.headers.replace('\r\n', '\n'), '\n\n', 1) + if len(ss) == 2: # headers done, process them string.replace(ss[0], '\r\n', '\n') lines = string.split(ss[0], '\n')