[BusyBox] httpd setgid support and CGI SERVER_ADDR var

Vladimir N. Oleynik dzo at simtreas.ru
Thu Oct 23 08:54:29 UTC 2003


>>Also, server adderess may be configured as bind/listen address.
> Yes, that is why I'm using the socket local endpoint to get the
> address--that is the ipaddr the client connected to for this request (in
> other words the interface they came in on for a multi-homed host).

Ok. bind option require small code, but many listener require very
big rewrite and added code.

> I see what your doing but instead of setting/using a few env vars you're
> starting up a shell to parse and set the env. vars and then start our
> CGI.  Seems like a lot of overhead per CGI request.  Since these env

I shall think of the weekend off as it is better to make.
For example, I have an idea to make a new option (like env applet syntax):

-s var1 ...

if this option specified then httpd saved this environ value from called
daemon info before clearenv(). default: -s PATH only.
If "var" have syntax VAR=value then httpd set/reset this env before call CGI.

I don`t know solution for one problem:
Whether we should keep value (strdup()) before a call of clearenv() function
or keep the pointer only as it is done with that
libbb/setup_environment() function enough.

I think supporting redirecting for httpd require, for example URL
httpd://www/dir must redirected to httpd://www/dir/ and if index.html presend
must redirected to httpd://www/dir/index.html
After realise redirector we can use SERVER_NAME control from config/env.


More information about the busybox mailing list