rolled back the http-form parameters parsing.

help for bfg's rain is in bfg's help now
This commit is contained in:
owein 2019-11-19 16:49:54 +01:00
parent b34655617f
commit ccd3a99765
2 changed files with 19 additions and 9 deletions

View file

@ -1250,12 +1250,23 @@ ptr_header_node initialize(char *ip, unsigned char options, char *miscptr) {
webport = PORT_HTTP_SSL;
sprintf(bufferurl, "%.6096s", miscptr);
ptr = bufferurl;
url = strtok(ptr, ":");
variables = strtok(NULL, ":");
cond = strtok(NULL, ":");
optional1 = strtok(NULL, "\n");
if(optional1 == NULL) optional1 = "";//will crash if NULL or 0, so set to blank
url = bufferurl;
ptr = url;
while (*ptr != 0 && (*ptr != ':' || *(ptr - 1) == '\\'))
ptr++;
if (*ptr != 0)
*ptr++ = 0;
variables = ptr;
while (*ptr != 0 && (*ptr != ':' || *(ptr - 1) == '\\'))
ptr++;
if (*ptr != 0)
*ptr++ = 0;
cond = ptr;
while (*ptr != 0 && (*ptr != ':' || *(ptr - 1) == '\\'))
ptr++;
if (*ptr != 0)
*ptr++ = 0;
optional1 = ptr;
if (strstr(url, "\\:") != NULL) {
if ((ptr = malloc(strlen(url))) != NULL) {