From 168c3d07ec6efa91d34d4e893dffa3431979a260 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 23 Dec 2015 10:03:30 +0000 Subject: examples/repobrowse.psgi: rename to eliminate the dash We've been refering to this as "repobrowse", so drop the '-'. While we're at it, enable chunking since we stream a good chunk of our responses to avoid having too much in memory at once. --- examples/repo-browse.psgi | 25 ------------------------- examples/repobrowse.psgi | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 25 deletions(-) delete mode 100644 examples/repo-browse.psgi create mode 100644 examples/repobrowse.psgi (limited to 'examples') diff --git a/examples/repo-browse.psgi b/examples/repo-browse.psgi deleted file mode 100644 index b02b8e8b..00000000 --- a/examples/repo-browse.psgi +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/perl -w -# Copyright (C) 2015 all contributors -# License: AGPL-3.0+ -# Note: this is part of our test suite, update t/plack.t if this changes -# Usage: plackup [OPTIONS] /path/to/this/file -use strict; -use warnings; -use PublicInbox::RepoBrowse; -use Plack::Request; -use Plack::Builder; -my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; -my $repo_browse = PublicInbox::RepoBrowse->new; - -builder { - if ($have_deflater) { - enable 'Deflater', - content_type => [ 'text/html', 'text/plain', - 'application/atom+xml' ]; - } - enable 'Head'; - sub { - my $req = Plack::Request->new(@_); - $repo_browse->run($req, $req->method); - } -} diff --git a/examples/repobrowse.psgi b/examples/repobrowse.psgi new file mode 100644 index 00000000..d7c096f8 --- /dev/null +++ b/examples/repobrowse.psgi @@ -0,0 +1,26 @@ +#!/usr/bin/perl -w +# Copyright (C) 2015 all contributors +# License: AGPL-3.0+ +# Note: this is part of our test suite, update t/plack.t if this changes +# Usage: plackup [OPTIONS] /path/to/this/file +use strict; +use warnings; +use PublicInbox::RepoBrowse; +use Plack::Request; +use Plack::Builder; +my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; +my $repo_browse = PublicInbox::RepoBrowse->new; + +builder { + enable 'Plack::Middleware::Chunked'; + if ($have_deflater) { + enable 'Deflater', + content_type => [ 'text/html', 'text/plain', + 'application/atom+xml' ]; + } + enable 'Head'; + sub { + my $req = Plack::Request->new(@_); + $repo_browse->run($req, $req->method); + } +} -- cgit v1.2.3-24-ge0c7