On Sat, 30 Mar 2002 16:14:55 +0000, Thom May wrote:

>This change appears to have broken some cgÑ  scripts - cricket
><http://cricket.sourceforge.net/> worked fine in 2.0.33 but in 2.0.34 and
>35-dev:
>
>[Sat Mar 30 15:20:03 2002] [error] [client 192.168.0.34] malformed header
>from
: /usr/lib/cgi-bin/cricket/grapher.cgi

I'm seeing something similar to this in recent code. This is from a virtual
include in an SSI:

[Sun Mar 31 14:24:05 2002] [error] [client 202.12.87.82] malformed header
from script. Bad header=
: F:/Data/Web.Pages/Silk/cgi-bin/count, referer: http://kheldar/silk/

Looking at the log file in a hex view the bad header appears to be a single
CR character, suggesting that CR/LF terminated lines are no longer accepted
from CGI scripts.

This fixes it for me, though may not be ideal:

Index: server/util_script.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util_script.c,v
retrieving revision 1.75
diff -u -r1.75 util_script.c
--- server/util_script.c        2002/03/30 22:48:39     1.75
+++ server/util_script.c        2002/03/31 04:34:42
@@ -645,7 +645,7 @@
             if (*src == '\n') {
                 done = 1;
             }
-            else {
+            else if (*src != '\r') {
                 *dst++ = *src;
             }
             src++;

--
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  [EMAIL PROTECTED]  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------

Reply via email to