diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-12-19 14:23:47 +0300 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-12-19 14:23:47 +0300 |
commit | 769a3ef08dba4097047ae12ac5c8e05927a20a75 (patch) | |
tree | 043100bd5bfefc2ada3806cf6cd63fe1ad483187 /networking/httpd.c | |
parent | f18bd8931d64dcaea6c9c41eb911fff37a38c29f (diff) |
Patch from Stephane Billiart:
This removes references to config->remoteuser when
CONFIG_FEATURE_HTTPD_CGI=y but CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 1a3f5f94f..a02b63a38 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1148,10 +1148,12 @@ static int sendCgi(const char *url, addEnv("HTTP", "COOKIE", cookie); if(content_type) addEnv("CONTENT", "TYPE", content_type); +#ifdef CONFIG_FEATURE_HTTPD_BASIC_AUTH if(config->remoteuser) { addEnv("REMOTE", "USER", config->remoteuser); addEnv("AUTH_TYPE", "", "Basic"); } +#endif if(config->referer) addEnv("HTTP", "REFERER", config->referer); @@ -1707,8 +1709,10 @@ FORBIDDEN: /* protect listing /cgi-bin */ # ifdef CONFIG_FEATURE_HTTPD_CGI free(cookie); free(content_type); - free(config->remoteuser); free(config->referer); +#ifdef CONFIG_FEATURE_HTTPD_BASIC_AUTH + free(config->remoteuser); +#endif # endif shutdown(a_c_w, SHUT_WR); shutdown(a_c_r, SHUT_RD); |