* [PATCH] httpd: avoid loading our WWW-specific code early
@ 2016-02-26 3:55 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-02-26 3:55 UTC (permalink / raw)
To: meta
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.
---
public-inbox-httpd | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/public-inbox-httpd b/public-inbox-httpd
index 772333e..b871e3d 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 {
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-26 3:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 3:55 [PATCH] httpd: avoid loading our WWW-specific code early Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).