From: Florian Forster Date: Sat, 19 May 2007 08:57:55 +0000 (+0200) Subject: contrib/collection.cgi: Print proper HTML-header. X-Git-Tag: collectd-4.0.0~29 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=bb7c797a7b7bc1a14f3760e9bab62d33c862c608;p=collectd.git contrib/collection.cgi: Print proper HTML-header. --- diff --git a/contrib/collection.cgi b/contrib/collection.cgi index 1666bdee..9fd504cd 100755 --- a/contrib/collection.cgi +++ b/contrib/collection.cgi @@ -481,12 +481,12 @@ sub action_show_plugin my $instance_html = encode_entities ($instance); my $instance_url = uri_escape ($instance); - print qq#
\n#; + print qq#
\n#; } if (!@{$types{$type}}) { - print qq#
\n#; + print qq#
\n#; } } } # action_show_plugin @@ -554,6 +554,39 @@ sub action_show_graph } } # action_show_graph +sub print_header +{ + print < + + + + + collection.cgi, Version 2 + + + + +HEAD +} # print_header + +sub print_footer +{ + print < + +FOOT +} # print_footer + sub main { read_config (); @@ -572,8 +605,7 @@ sub main return (0); } - print STDOUT header (-Content_Type => 'text/html'); - print STDOUT "
", Data::Dumper->Dump ([$Args], ['Args']), "
\n"; + print_header (); if (!$Args->{'host'}) { @@ -595,6 +627,8 @@ sub main $Args->{'type'}, $Args->{'type_instance'}); } + print_footer (); + return (0); }