X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fcallscgi.c;h=e388ab259083624ecc85500fa22bc2c10e9dcb38;hp=299e09f052f6f484c560907621cd96e233e436bd;hb=1af656d2284a5f51631ae11ee9fa068af5c1ccc4;hpb=2dbb9937cfe0d4f4a059181621c52d0fbd0c7eb1 diff --git a/src/callscgi.c b/src/callscgi.c index 299e09f..e388ab2 100644 --- a/src/callscgi.c +++ b/src/callscgi.c @@ -436,6 +436,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst) free(url); if((h = getheader(req, "Host")) != NULL) bufaddenv(dst, "SERVER_NAME", "%s", h); + if((h = getheader(req, "X-Ash-Server-Address")) != NULL) + bufaddenv(dst, "SERVER_ADDR", "%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) @@ -444,6 +446,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst) bufaddenv(dst, "HTTPS", "on"); if((h = getheader(req, "X-Ash-Address")) != NULL) bufaddenv(dst, "REMOTE_ADDR", "%s", h); + if((h = getheader(req, "X-Ash-Port")) != NULL) + bufaddenv(dst, "REMOTE_PORT", "%s", h); if((h = getheader(req, "Content-Type")) != NULL) bufaddenv(dst, "CONTENT_TYPE", "%s", h); if((h = getheader(req, "Content-Length")) != NULL)