HomeClusterLabs Projects

Fix: tools: Add the http-equiv header to crm_mon at the right time.

Description

Fix: tools: Add the http-equiv header to crm_mon at the right time.

This header is only getting added on termination, which is not a lot of
help if you're running crm_mon in daemonize mode. Putting this header
in at the right time requires a couple changes:

  • pcmk__html_add_header doesn't need a parent argument. It was not

being used in the first place.

  • The extra_headers list in output_html.c should not be freed in the

reset function. This means it would get freed after every time the
daemonized output is refreshed, which means the header would have to be
added every time too. extra_headers will now only be freed when the
program exits. This is a behavior change, but I can't see why it's
going to be a problem.

  • To support that, we need to copy each item in the extra_headers list

when it gets added to the output XML document. This prevents segfaults
when we later free that document.

  • handle_html_output no longer needs to exist. That function only

existed to add the http-equiv header at the end, which is wrong.

Details

Provenance
clumensAuthored on Jul 17 2020, 10:58 AM
Parents
rP0f8e4ca5d9a4: Fix: tools, libcrmcommon: Reopen the output dest on reset.
Branches
Unknown
Tags
Unknown

Event Timeline