busybox httpd cgi environment

Paul Albrecht albrecht at rdi1.com
Wed Sep 12 19:34:23 UTC 2007


On Wed, 2007-09-12 at 21:15 +0100, Denys Vlasenko wrote:
> On Wednesday 12 September 2007 17:02, Paul Albrecht wrote:
> > 
> > Hi,
> > 
> > I have a question about busybox httpd and its cgi environment:  Is there
> > a way to setup and/or access environment variables other than the
> > variables that are defined by the common gateway interface?
> 
> CGI cannot "setup" (i.e. change) environment variables
> of the parent httpd process. It can only play with its own ones.
> 
> > The reason I'm asking is because I'm writing a cgi program that handles
> > a form differently depending on how my system is configured so the
> > results aren't completely defined using cgi variables.
> 
> I *think* httpd just passes down whatever environment variables
> it got set at the moment it was started itself.
> 
> If it is not so, report it as a bug.

OK, Busybox httpd_main calls clearenv if ENABLE_FEATURE_HTTPD_CGI and
that's a bug. Please delete the call to clearenv in http_main. Thanks!

Paul Albrecht 



More information about the busybox mailing list