diff options
author | Eric Wong <e@80x24.org> | 2016-05-30 00:51:44 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-05-30 00:55:36 +0000 |
commit | 21cf3d6a9a4be06deca4adea9de071f772fb1c57 (patch) | |
tree | d0bd52cc06d0bdca64f5c03d25b24e31d29d50d3 /t | |
parent | 9665b1ffe0c5417e54ccd313794577d7c62c429c (diff) | |
download | public-inbox-21cf3d6a9a4be06deca4adea9de071f772fb1c57.tar.gz |
Plack::Request is unnecessary overhead for this given the strictness of git-http-backend. Furthermore, having to make commit 311c2adc8c63 ("avoid Plack::Request parsing body") to avoid tempfiles should not have been necessary.
Diffstat (limited to 't')
-rw-r--r-- | t/git-http-backend.psgi | 6 | ||||
-rw-r--r-- | t/git-http-backend.t | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/t/git-http-backend.psgi b/t/git-http-backend.psgi index c9607143..66f41505 100644 --- a/t/git-http-backend.psgi +++ b/t/git-http-backend.psgi @@ -6,7 +6,6 @@ use warnings; use PublicInbox::GitHTTPBackend; use PublicInbox::Git; use Plack::Builder; -use Plack::Request; use BSD::Resource qw(getrusage); my $git_dir = $ENV{GIANT_GIT_DIR} or die 'GIANT_GIT_DIR not defined in env'; my $git = PublicInbox::Git->new($git_dir); @@ -14,9 +13,8 @@ builder { enable 'Head'; sub { my ($env) = @_; - my $pr = Plack::Request->new($env); - if ($pr->path_info =~ m!\A/(.+)\z!s) { - PublicInbox::GitHTTPBackend::serve($pr, $git, $1); + if ($env->{PATH_INFO} =~ m!\A/(.+)\z!s) { + PublicInbox::GitHTTPBackend::serve($env, $git, $1); } else { my $ru = getrusage(); my $b = $ru->maxrss . "\n"; diff --git a/t/git-http-backend.t b/t/git-http-backend.t index 889d507a..e8793923 100644 --- a/t/git-http-backend.t +++ b/t/git-http-backend.t @@ -13,7 +13,7 @@ use Cwd qw(getcwd); my $git_dir = $ENV{GIANT_GIT_DIR}; plan 'skip_all' => 'GIANT_GIT_DIR not defined' unless $git_dir; foreach my $mod (qw(Danga::Socket - Plack::Util Plack::Request Plack::Builder + Plack::Util Plack::Builder HTTP::Date HTTP::Status Net::HTTP)) { eval "require $mod"; plan skip_all => "$mod missing for git-http-backend.t" if $@; |