Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sun, 26 Sep 2004 14:06:07 +0200
From: "Gerrit P. Haase" <gp@familiehaase.de>
Reply-To: "Gerrit P. Haase" <gp@familiehaase.de>
Organization: Esse keine toten Tiere
Message-ID: <513423888.20040926140607@familiehaase.de>
To: Jan Kneschke <jan@kneschke.de>
CC: Brian Dessent <brian@dessent.net>, cygwin@cygwin.com,
   lighttpd@lists.kneschke.de
Subject: Re: lighttpd - problems with cgi scripts
In-Reply-To: <20040926081347.GL18016@gateway>
References: <4155E9CE.5060903@familiehaase.de> <41560B26.FCC450C7@dessent.net> <1645302901.20040926033627@familiehaase.de> <415620DD.7B0537B9@dessent.net> <20040926081347.GL18016@gateway>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Hello Jan,

Am Sonntag, 26. September 2004 um 10:13 schriebst du:

> On Sat, Sep 25, 2004 at 06:52:29PM -0700, Brian Dessent wrote:
>> "Gerrit P. Haase" wrote:
>> 
>> > That works, thanks for pointing this out, however, lighttpd should
>> > simply give back an error instead of burning my cpu.
>> 
>> I agree.

> Hmm, it is not supposed to burn the cpu and I'll take a look at the
> problem and see if I can reqproduce it.

Thanks.

>> > > This sounds suspiciously like the "SYSTEMROOT being removed from the
>> > > environment" problem.
>> > 
>> > Hmmm, SYSTEMROOT:
>> > $ set | grep SYSTEMROOT
>> > SYSTEMROOT='C:\WINNT'
>> 
>> That's from a normal shell prompt though, right?  It must be set in the
>> environment of the CGI script that's forked from the lighttpd.  Try a
>> simple CGI that just runs "printenv" and see if it's set there. The
>> reason it seems to come up in CGI scripts is that often the environment
>> is cleansed of all but certain permitted variables, and it seems that
>> SYSTEMROOT is the casualty of this.  It's a situation particular to
>> Cygwin, as win32 native code would know not to remove it, whereas its
>> meaningless to stuff written for posix/unix.

> add 

> #ifdef __CYGWIN__
>                 /* CYGWIN needs SYSTEMROOT */
>                 cgi_env_add(&env, "SYSTEMROOT", getenv("SYSTEMROOT"));
> #endif


> to src/cgi.c in line 640 (or in that range) and tell me if that fixes
> it.
 
Jau, now it works!  Great fix, many thanks!


Gerrit
-- 
=^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

