From ffa26e2be728c90e813ccc5d7b939e674a4864d4 Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 19 Nov 2008 18:10:37 +0000 Subject: [PATCH] none --- examples/gitweb.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/gitweb.php b/examples/gitweb.php index 33037c33..128a1c72 100644 --- a/examples/gitweb.php +++ b/examples/gitweb.php @@ -6,5 +6,10 @@ $uri2 = $_REQUEST["file"]; $gitfile0 = ereg_replace (".*/examples/", "", $uri); $gitfile1 = "testsuite/systemtap.examples/$gitfile0"; # echo ("$uri $uri1 $uri2 $gitfile0 $gitfile1\n"); +$pathparts = pathinfo($gitfile1); +switch ($pathparts['extension']) { + "html": echo ("Content-Type: text/html\n\n"); break; + default: echo ("Content-Type: text/plain\n\n"); +} passthru ("git --git-dir=/git/systemtap.git show HEAD:$gitfile1"); ?> -- 2.43.5