about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-26 03:51:47 +0000
committerEric Wong <e@80x24.org>2016-02-26 03:54:03 +0000
commitf8629575e505828e8d19d430aea68699802bd820 (patch)
tree68190e0d9ee2aba623cafc70675080a68e7a111e
parent5cd892559c1babb2f4a7576a6d6c6313de6b069a (diff)
downloadpublic-inbox-f8629575e505828e8d19d430aea68699802bd820.tar.gz
We want this to be usable as a generic httpd for other Free Software
projects, so do not force users to load our WWW code at
compile-time.
-rw-r--r--public-inbox-httpd6
1 files changed, 2 insertions, 4 deletions
diff --git a/public-inbox-httpd b/public-inbox-httpd
index 772333e8..b871e3de 100644
--- a/public-inbox-httpd
+++ b/public-inbox-httpd
@@ -8,13 +8,9 @@ use warnings;
 use Plack::Util;
 use PublicInbox::Daemon;
 use PublicInbox::HTTP;
-use PublicInbox::WWW;
 use Plack::Request;
 use Plack::Builder;
-PublicInbox::WWW->preload;
-my $have_deflater = eval { require Plack::Middleware::Deflater; 1 };
 my %httpds;
-my $config;
 my $app;
 my $refresh = sub {
         if (@ARGV) {
@@ -24,6 +20,8 @@ my $refresh = sub {
 "$0 runs in /, command-line paths must be absolute\n";
                 }
         } else {
+                require PublicInbox::WWW;
+                PublicInbox::WWW->preload;
                 my $www = PublicInbox::WWW->new;
                 $app = eval {
                         my $deflate_types = eval {