blob: ca62e8482f12b4babc1d2246bf3b1c9a7338636b (
plain) (
blame)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php $uri = $_SERVER["REQUEST_URI"]; $gitfile0 = ereg_replace (".*/examples/", "", $uri); if ($gitfile0 == "") { $gitfile0 = "index.html"; } if (! preg_match ("/^[A-Za-z0-9_./-]*$/", $gitfile0)) { die ("bad chars ".htmlspecialchars($gitfile0)); } $gitfile1 = "testsuite/systemtap.examples/$gitfile0"; $pathparts = pathinfo($gitfile1); switch ($pathparts['extension']) { case "html": header ("Content-Type: text/html"); break; default: header ("Content-Type: text/plain"); } passthru ("git --git-dir=/git/systemtap.git show HEAD:$gitfile1"); ?>
|