From b77076c4041fdd70f9c5d1bcc48ec248d7e6fd3b Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 27 Feb 2011 11:57:26 +0100 Subject: [PATCH] call[fs]cgi: Fixed bug-fix bug. --- src/callfcgi.c | 2 +- src/callscgi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/callfcgi.c b/src/callfcgi.c index 1ff521e..27c9c5e 100644 --- a/src/callfcgi.c +++ b/src/callfcgi.c @@ -465,8 +465,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst) } else { bufaddenv(dst, "SCRIPT_NAME", "%s", url); } - free(url); bufaddenv(dst, "QUERY_STRING", "%s", qp?qp:""); + free(url); if((h = getheader(req, "Host")) != NULL) bufaddenv(dst, "SERVER_NAME", "%s", h); if((h = getheader(req, "X-Ash-Server-Port")) != NULL) diff --git a/src/callscgi.c b/src/callscgi.c index e91759e..07064f3 100644 --- a/src/callscgi.c +++ b/src/callscgi.c @@ -428,8 +428,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst) } else { bufaddenv(dst, "SCRIPT_NAME", "%s", url); } - free(url); bufaddenv(dst, "QUERY_STRING", "%s", qp?qp:""); + free(url); if((h = getheader(req, "Host")) != NULL) bufaddenv(dst, "SERVER_NAME", "%s", h); if((h = getheader(req, "X-Ash-Server-Port")) != NULL) -- 2.11.0