From f733c904293bb50ac2c5bcfc441b527fcec30e19 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Jan 31 2015 00:43:10 +0000 Subject: Ticket #48024 - repl-monitor invoked from adminserver cgi fails Description: A generated file by a cgi script requires the "Content- Type: text/html" at the top. This patch adds it. Also, removing the old default config file path, e.g., /etc/dirsrv/eplmon.conf, which we don't include any more. https://fedorahosted.org/389/ticket/48024 Reviewed by rmeggins@redhat.com (Thank you, Rich!!) --- diff --git a/admserv/cgi-src40/repl-monitor-cgi.pl.in b/admserv/cgi-src40/repl-monitor-cgi.pl.in index 5529454..3a7cc05 100755 --- a/admserv/cgi-src40/repl-monitor-cgi.pl.in +++ b/admserv/cgi-src40/repl-monitor-cgi.pl.in @@ -43,15 +43,7 @@ use CGI; my $query = CGI->new; @ARGV = (); # clear it out -if ( $query->url_param('configfile') eq "" ) { - my $configfile; - if ($ENV{DS_CONFIG_DIR} and -d $ENV{DS_CONFIG_DIR}) { - $configfile = "$ENV{DS_CONFIG_DIR}/@instancename@/replmon.conf"; - } elsif ("@instconfigdir@" and -d "@instconfigdir@") { - $configfile = "@instconfigdir@/replmon.conf"; - } - push @ARGV, '-f', $configfile; -} else { +if ( $query->url_param('configfile') ne "" ) { push @ARGV, '-f', $query->url_param('configfile'); } @@ -76,4 +68,5 @@ if ( $query->url_param('servport') ne "" ) { } # Now the real work +print "Content-Type: text/html\n\n"; require "@bindir@/repl-monitor.pl";