server_url = getenv("SERVER_URL");
}
- if (optind != argc-1) {
- fprintf(stderr, "ERROR: expected a filename\n");
- exit(1);
+ if ( (optind != argc-2 && strstr(getenv("SERVER_SOFTWARE"),"Apache/2") != NULL) && optind != argc-1) {
+ fprintf(stderr, "ERROR: expected a filename\n");
+ exit(1);
} else {
length = readfile(argv[optind], &buffer, 1);
}
}
}
+static
char* rrdstrip(char *buf){
char *start;
if (buf == NULL) return NULL;
}
/* scan aLine until an unescaped '>' arives */
+static
char* scanargs(char *aLine, long *argc, char ***args)
{
char *getP, *putP;
getP = aLine;
putP = aLine;
while (*getP && !( !Quote && (braket == 0) && ((*getP) == '>'))){
- if (*getP < ' ') *getP = ' '; /*remove all special chars*/
+ if ((unsigned)*getP < ' ') *getP = ' '; /*remove all special chars*/
switch (*getP) {
case ' ':
if (Quote){