]> www.dolda2000.com Git - ashd.git/commitdiff
call[fs]cgi: Fixed bug-fix bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 27 Feb 2011 10:57:26 +0000 (11:57 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 27 Feb 2011 10:57:26 +0000 (11:57 +0100)
src/callfcgi.c
src/callscgi.c

index 1ff521e6b56cfa1fd303fef1a90aa6510ebfe5e5..27c9c5e609f9dba4de184bd20b96db06e8274e95 100644 (file)
@@ -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)
index e91759e46c32b04ac92e28b9a05f8fcb85f3dec7..07064f3c348f570a14538e0db9a003a3f9040273 100644 (file)
@@ -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)