diff options
author | Eric Wong <e@80x24.org> | 2016-02-25 03:10:51 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-02-25 04:03:04 +0000 |
commit | 65ff86f333a1f8276943248efef7fa2a64afe9e3 (patch) | |
tree | 5484558c52d1047d1c6d9fe8d68dde85faa3c649 /public-inbox-httpd | |
parent | 8968889e3ebfa09dd2c80fe8b917b83ac13ff356 (diff) | |
download | public-inbox-65ff86f333a1f8276943248efef7fa2a64afe9e3.tar.gz |
This allows multiple instances the WWW app from running within the same process space
Diffstat (limited to 'public-inbox-httpd')
-rw-r--r-- | public-inbox-httpd | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/public-inbox-httpd b/public-inbox-httpd index 6436bd7d..3635c9a7 100644 --- a/public-inbox-httpd +++ b/public-inbox-httpd @@ -24,6 +24,7 @@ my $refresh = sub { "$0 runs in /, command-line paths must be absolute\n"; } } else { + my $www = PublicInbox::WWW->new; $app = eval { my $deflate_types = eval { require Plack::Middleware::Deflater; @@ -37,11 +38,7 @@ my $refresh = sub { content_type => $deflate_types } enable 'Head'; - sub { - my $req = Plack::Request->new(@_); - PublicInbox::WWW::run($req, - $req->method); - }; + sub { $www->call(@_) }; }; }; } |