summaryrefslogtreecommitdiffstats
path: root/source/web
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-15 18:57:41 +0000
committerGerald Carter <jerry@samba.org>2003-01-15 18:57:41 +0000
commit0fb724b3216eeeb97e61ff12755ca3a31bcad6ef (patch)
tree956e2b73804c4b8575c0d2f239af1d248332f1a3 /source/web
parent787830782c14d219bd15f28969ed3c9fd251dbed (diff)
downloadsamba-0fb724b3216eeeb97e61ff12755ca3a31bcad6ef.tar.gz
samba-0fb724b3216eeeb97e61ff12755ca3a31bcad6ef.tar.xz
samba-0fb724b3216eeeb97e61ff12755ca3a31bcad6ef.zip
*lots of small merges form HEAD
*sync up configure.in *don't build torture tools in make all *make sure to remove torture tools as part of make clean
Diffstat (limited to 'source/web')
-rw-r--r--source/web/cgi.c45
1 files changed, 4 insertions, 41 deletions
diff --git a/source/web/cgi.c b/source/web/cgi.c
index 1cec580c675..018dd3602fd 100644
--- a/source/web/cgi.c
+++ b/source/web/cgi.c
@@ -46,43 +46,6 @@ static char *C_user;
static BOOL inetd_server;
static BOOL got_request;
-static void unescape(char *buf)
-{
- char *p=buf;
-
- while ((p=strchr_m(p,'+')))
- *p = ' ';
-
- p = buf;
-
- while (p && *p && (p=strchr_m(p,'%'))) {
- int c1 = p[1];
- int c2 = p[2];
-
- if (c1 >= '0' && c1 <= '9')
- c1 = c1 - '0';
- else if (c1 >= 'A' && c1 <= 'F')
- c1 = 10 + c1 - 'A';
- else if (c1 >= 'a' && c1 <= 'f')
- c1 = 10 + c1 - 'a';
- else {p++; continue;}
-
- if (c2 >= '0' && c2 <= '9')
- c2 = c2 - '0';
- else if (c2 >= 'A' && c2 <= 'F')
- c2 = 10 + c2 - 'A';
- else if (c2 >= 'a' && c2 <= 'f')
- c2 = 10 + c2 - 'a';
- else {p++; continue;}
-
- *p = (c1<<4) | c2;
-
- memmove(p+1, p+3, strlen(p+3)+1);
- p++;
- }
-}
-
-
static char *grab_line(FILE *f, int *cl)
{
char *ret = NULL;
@@ -167,8 +130,8 @@ void cgi_load_variables(void)
!variables[num_variables].value)
continue;
- unescape(variables[num_variables].value);
- unescape(variables[num_variables].name);
+ rfc1738_unescape(variables[num_variables].value);
+ rfc1738_unescape(variables[num_variables].name);
#ifdef DEBUG_COMMENTS
printf("<!== POST var %s has value \"%s\" ==>\n",
@@ -198,8 +161,8 @@ void cgi_load_variables(void)
!variables[num_variables].value)
continue;
- unescape(variables[num_variables].value);
- unescape(variables[num_variables].name);
+ rfc1738_unescape(variables[num_variables].value);
+ rfc1738_unescape(variables[num_variables].name);
#ifdef DEBUG_COMMENTS
printf("<!== Commandline var %s has value \"%s\" ==>\n",