Patch by Laszlo Zavaleta <wry@kopu.org> to accept ';' as delimiter
authorJoey Schulze <joey@infodrom.org>
Sun, 25 Nov 2007 16:17:54 +0000 (16:17 +0000)
committerJoey Schulze <joey@infodrom.org>
Sun, 25 Nov 2007 16:17:54 +0000 (16:17 +0000)
cgi.c

diff --git a/cgi.c b/cgi.c
index dfeb2e0..c3d2d50 100644 (file)
--- a/cgi.c
+++ b/cgi.c
@@ -229,7 +229,7 @@ s_var **cgiReadVariables ()
 
     if (strlen(line)) {
        for (numargs=1,cp=line; *cp; cp++)
-           if (*cp == '&') numargs++;
+           if (*cp == '&' || *cp == ';' ) numargs++;
     } else
        numargs = 0;
     if (cgiDebugLevel > 0) {
@@ -249,7 +249,9 @@ s_var **cgiReadVariables ()
     while (*cp) {
        if ((ip = (char *)strchr(cp, '&')) != NULL) {
            *ip = '\0';
-       }else
+       } else if ((ip = (char *)strchr(cp, ';')) != NULL) {
+           *ip = '\0';
+       } else
            ip = cp + strlen(cp);
 
        if ((esp=(char *)strchr(cp, '=')) == NULL) {