call[fs]cgi: Fixed quoting bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Fri, 30 Oct 2015 04:14:32 +0000 (05:14 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Fri, 30 Oct 2015 04:14:32 +0000 (05:14 +0100)
src/callfcgi.c
src/callscgi.c

index 3dc23c0..6b04c20 100644 (file)
@@ -473,8 +473,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst)
        pi = sprintf2("/%s", tmp = pi);
        free(tmp);
     }
-    bufaddenv(dst, "PATH_INFO", pi);
-    bufaddenv(dst, "SCRIPT_NAME", url);
+    bufaddenv(dst, "PATH_INFO", "%s", pi);
+    bufaddenv(dst, "SCRIPT_NAME", "%s", url);
     bufaddenv(dst, "QUERY_STRING", "%s", qp?qp:"");
     free(pi);
     free(url);
index 48d2362..3c26e33 100644 (file)
@@ -436,8 +436,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst)
        pi = sprintf2("/%s", tmp = pi);
        free(tmp);
     }
-    bufaddenv(dst, "PATH_INFO", pi);
-    bufaddenv(dst, "SCRIPT_NAME", url);
+    bufaddenv(dst, "PATH_INFO", "%s", pi);
+    bufaddenv(dst, "SCRIPT_NAME", "%s", url);
     bufaddenv(dst, "QUERY_STRING", "%s", qp?qp:"");
     free(pi);
     free(url);