[icinga-checkins] icinga.org: icinga-core/r1.6: classic ui: fixed Extra leading space in status.cgi CSV output #2535

git at icinga.org git at icinga.org
Sat Apr 28 11:11:39 CEST 2012


Module: icinga-core
Branch: r1.6
Commit: 2f0fc38e3ea5a8925598811109535f9e30657947
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=2f0fc38e3ea5a8925598811109535f9e30657947

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Sat Apr 21 12:36:55 2012 +0200

classic ui: fixed Extra leading space in status.cgi CSV output #2535

refs: #2535

header only gets flushed out on html content now

Conflicts:

	cgi/status.c

---

 cgi/status.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/cgi/status.c b/cgi/status.c
index 0705162..874a6bd 100644
--- a/cgi/status.c
+++ b/cgi/status.c
@@ -670,10 +670,13 @@ int main(void) {
 		printf("</object>");
 	}
 
-
-	// flush the data we allready have
-	printf(" ");
-	fflush(NULL);
+	/* flush the data we allready have
+	   but do this only if we display HTML content
+	*/
+	if (content_type == HTML_CONTENT) {
+		printf(" ");
+		fflush(NULL);
+	}
 
 	/* bottom portion of screen - service or hostgroup detail */
 	if (display_type == DISPLAY_HOSTS) {





More information about the icinga-checkins mailing list