--- cgiold.h Sun Jul 2 20:10:47 2000 +++ cgi.h Sun Jul 2 20:02:15 2000 @@ -3,6 +3,9 @@ // Check http://www.arachne.cz/ for more details. +// patched by PASKY - now just -DRFROM_CONSOLE and no exit(-1)'ll more happens +// and one more patch by PASKY - *partial* fix of broken name-search in query string + #include #include #include @@ -32,7 +35,11 @@ char *a=getenv("REQUEST_METHOD"); if(!a) +#ifndef RFROM_CONSOLE exit(-1); +#else + return NULL; +#endif if(!strcmp(a,"POST")) { @@ -89,7 +96,9 @@ if(!qs) return 0; - ptr=strstr(qs,name); + ptr=qs; +cgiznovu: + ptr=strstr(ptr,name); *value='\0'; if(ptr) { @@ -98,7 +107,7 @@ return 0; else if(*ptr=='=') - ptr++; + ptr++; else if (*ptr!='&') goto cgiznovu; while(*ptr && *ptr!='&' && len