The following proposed patch for stable 3.1, was originally proposed for
backport by Bernard in r1424 (Jun 17, 2008), but has since been extended
and votes reset as of r1439.

It changes the way that debug>2 is handled by graph.php to avoid returning
and invalid document with the command printed before the headers are set and
since r1438 with the right content type of text/plain as the command that is
printed it is not formatted as an HTML document.

Contains changes to web/graph.php from r1423 and r1438

Carlo
---
Index: web/graph.php
===================================================================
--- web/graph.php       (revision 1328)
+++ web/graph.php       (working copy)
@@ -220,10 +220,12 @@
     header ("Cache-Control: no-cache, must-revalidate");   // HTTP/1.1
     header ("Pragma: no-cache");                     // HTTP/1.0
     if ($debug>2) {
+        header ("Content-type: text/plain");
         print htmlentities( $command ) . "\n\n\n\n\n";
+    } else {
+        header ("Content-type: image/gif");
+        passthru($command);
     }
-    header ("Content-type: image/gif");
-    passthru($command);
 }
 
 ?>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to