Blob Blame History Raw
From 5b98dd71cef867a115a1b07fca2351ba430baf08 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Fri, 10 Jan 2020 09:54:59 -0500
Subject: [PATCH] Fix: tools: Re-enable CGI output from crm_mon.

The CGI header was not being written out because "false" was being
passed to the finish function.  That was being passed because we didn't
want the HTML to be printed out without the refresh header.  The fix is
just to s/false/true, and change the order so the extra header is added
first.
---
 tools/crm_mon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/crm_mon.c b/tools/crm_mon.c
index c1dcf29..4b28bef 100644
--- a/tools/crm_mon.c
+++ b/tools/crm_mon.c
@@ -1854,10 +1854,9 @@ static void
 handle_html_output(crm_exit_t exit_code) {
     xmlNodePtr html = NULL;
 
-    out->finish(out, exit_code, false, (void **) &html);
     pcmk__html_add_header(html, "meta", "http-equiv", "refresh", "content",
                           crm_itoa(options.reconnect_msec/1000), NULL);
-    htmlDocDump(out->dest, html->doc);
+    out->finish(out, exit_code, true, (void **) &html);
 }
 
 /*
-- 
1.8.3.1