httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <>
Subject [Win32] CGI batch file problem?
Date Sat, 30 Jan 1999 20:02:30 GMT
Erm, something seems to be up with CGI execution of batch files, unless
I'm doing something strange.

Here is what I did:

 - Create a file called 1.bat, containing just the line

echo HelloDown

 - Put that into a script-aliased directory
 - Request it:


% telnet winnt 8080
GET /cgi-bin/1.bat HTTP/1.0

HTTP/1.1 200 OK
Date: Sat, 30 Jan 1999 19:54:15 GMT
Server: Apache/1.3.5-dev (Win32)
Connection: close
Content-Type: text/plain

d:\apache\cgi-bin>echo HelloDown 
Connection closed by foreign host.


Look, it showed me the full path of the file directory (!), what it was
executing and the results. So the output is consistent with a batch file
that doesn't start @echo off, but where Apache doesn't parse the scriput
output. Adding @echo off makes things work as expected (i.e. in this case,
get a 500 server error because of premature end of headers).

I would look into this more, but it is the end of the day and if this is
reproducable it looks like a serious problem so I though I'd mail it now.


PS the test comes from PR#3574, with a different result (submitter says it
"kills" Apache 1.3.2). I didn't expect it to, but I did expect it to give
a 500 server error.

View raw message