From: Eric Wong Date: Mon, 30 May 2016 01:01:09 +0000 (+0000) Subject: www: remove gratuitous use of Plack::Request methods X-Git-Tag: v1.0.0~471 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1addae0198108a14cec9d3b306f5c51c70a5e053;p=public-inbox.git www: remove gratuitous use of Plack::Request methods Accessing $env directly is faster and we will eventually remove all Plack::Request dependencies. --- 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;