call*cgi: Added the REMOTE_USER CGI variable, as a mapping from X-Ash-Remote-User.
[ashd.git] / src / callscgi.c
index af84a9a..ba598fd 100644 (file)
@@ -428,6 +428,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst)
        bufaddenv(dst, "SERVER_NAME", "%s", h);
     if((h = getheader(req, "X-Ash-Server-Port")) != NULL)
        bufaddenv(dst, "SERVER_PORT", "%s", h);
+    if((h = getheader(req, "X-Ash-Remote-User")) != NULL)
+       bufaddenv(dst, "REMOTE_USER", "%s", h);
     if(((h = getheader(req, "X-Ash-Protocol")) != NULL) && !strcmp(h, "https"))
        bufaddenv(dst, "HTTPS", "on");
     if((h = getheader(req, "X-Ash-Address")) != NULL)