From 4e7aecbac8c7e4c57f1f74495312a9d12f2be04a Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 24 Oct 2002 21:17:51 +0000 Subject: [PATCH] added patch for apache 2 compatibility git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@165 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_cgi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c index 9c81c154..83a481f8 100644 --- a/program/src/rrd_cgi.c +++ b/program/src/rrd_cgi.c @@ -128,9 +128,9 @@ int main(int argc, char *argv[]) { 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); } -- 2.30.2