about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepobrowseBase.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-04-04 21:09:19 +0000
committerEric Wong <e@80x24.org>2016-04-05 23:50:12 +0000
commit25b49fc37121d8584b84b44b20c910ef43c44950 (patch)
tree848f28873118519deed9175dd67f8c77410b89d0 /lib/PublicInbox/RepobrowseBase.pm
parent07ba708d4d52f25f371b72801f0b00458944d634 (diff)
downloadpublic-inbox-25b49fc37121d8584b84b44b20c910ef43c44950.tar.gz
We currently do not display links to snapshots, but may in the
future (optionally, like cgit).  However, support snapshots for
compatibility reasons in case people had cached URLs or
auto-generated them somewhere.

We won't natively support xz and bzip2 just yet, but will
document (at least in comments) how to enable these expensive
compression schemes via git-config(1).  Also, support disabling
certain archive types to twart URL guessing or old cached links
from spiders burning bandwidth.

In retrospect, enabling snapshots for my own cgit views was a
bad idea since it wastes bandwidth from crawlers and is
is often not useful for users with maintainer-built files
(e.g. "configure" from "configure.ac" for autoconf, where
 only the latter is stored in git and the former is
 generated in release tarballs).
Diffstat (limited to 'lib/PublicInbox/RepobrowseBase.pm')
-rw-r--r--lib/PublicInbox/RepobrowseBase.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepobrowseBase.pm b/lib/PublicInbox/RepobrowseBase.pm
index 7863d6ce..33647fca 100644
--- a/lib/PublicInbox/RepobrowseBase.pm
+++ b/lib/PublicInbox/RepobrowseBase.pm
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 require PublicInbox::RepobrowseGitQuery;
 use PublicInbox::Hval;
-our %MIME_TYPE_WHITELIST = ( 'application/pdf' => 1 );
+our %MIME_TYPE_WHITELIST = ('application/pdf' => 1);
 
 sub new { bless {}, shift }
 
@@ -107,7 +107,7 @@ sub r {
                 # mainly for curl (no-'-L') users:
                 $body = "Redirecting to $redir\n";
         } else {
-                die "not implemented, yet: $status";
+                push @h, qw(Content-Type text/plain);
         }
 
         [ $status, \@h, [ $body ] ]