+sub serve_dumb {
+ my ($env, $git, $path) = @_;
+
+ my $h = [];
+ my $type;
+ if ($path =~ m!\Aobjects/[a-f0-9]{2}/[a-f0-9]{38}\z!) {
+ $type = 'application/x-git-loose-object';
+ cache_one_year($h);
+ } elsif ($path =~ m!\Aobjects/pack/pack-[a-f0-9]{40}\.pack\z!) {
+ $type = 'application/x-git-packed-objects';
+ cache_one_year($h);
+ } elsif ($path =~ m!\Aobjects/pack/pack-[a-f0-9]{40}\.idx\z!) {
+ $type = 'application/x-git-packed-objects-toc';
+ cache_one_year($h);
+ } elsif ($path =~ /\A(?:$TEXT)\z/o) {
+ $type = 'text/plain';
+ push @$h, @no_cache;
+ } else {
+ return r(404);
+ }
+
+ static_result($env, $h, "$git->{git_dir}/$path", $type);
+}
+