From ce7330d2237bd4170843691daaba961082860ae8 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/program@165 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_cgi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 9c81c15..83a481f 100644 --- a/src/rrd_cgi.c +++ b/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.11.0