call*cgi: Added the REMOTE_USER CGI variable, as a mapping from X-Ash-Remote-User.
[ashd.git] / src / callfcgi.c
index a394a42..d36e98c 100644 (file)
@@ -465,6 +465,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)