From 1addae0198108a14cec9d3b306f5c51c70a5e053 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 30 May 2016 01:01:09 +0000 Subject: www: remove gratuitous use of Plack::Request methods Accessing $env directly is faster and we will eventually remove all Plack::Request dependencies. --- lib/PublicInbox/WWW.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/WWW.pm') diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 88d4f6f0..a8202073 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -41,9 +41,9 @@ sub call { my ($self, $env) = @_; my $cgi = Plack::Request->new($env); my $ctx = {cgi => $cgi, pi_config => $self->{pi_config}, www => $self}; - my $path_info = $cgi->path_info; + my $path_info = $env->{PATH_INFO}; + my $method = $env->{REQUEST_METHOD}; - my $method = $cgi->method; if ($method eq 'POST' && $path_info =~ m!$INBOX_RE/(git-upload-pack)\z!) { my $path = $2; -- cgit v1.2.3-24-ge0c7