diff options
author | Eric Wong <e@80x24.org> | 2016-12-22 04:38:13 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-22 04:38:13 +0000 |
commit | 96ee5f0f64972f0ce3143538437d4de1febe3c51 (patch) | |
tree | 8035541c7ddeee835be3c81dc5d30b2614fa67b1 /lib/PublicInbox/RepobrowseGitAtom.pm | |
parent | 00abc9a8c4582d8635c989fdf4010ff30cb92d4d (diff) | |
download | public-inbox-96ee5f0f64972f0ce3143538437d4de1febe3c51.tar.gz |
This does not make installation easier, but lightens runtime a bit. Plack::Request is unnecessary bloat and indirection which does things behind our back. $env has all the stuff we need.
Diffstat (limited to 'lib/PublicInbox/RepobrowseGitAtom.pm')
-rw-r--r-- | lib/PublicInbox/RepobrowseGitAtom.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/RepobrowseGitAtom.pm b/lib/PublicInbox/RepobrowseGitAtom.pm index 063cd2e4..7c4082a6 100644 --- a/lib/PublicInbox/RepobrowseGitAtom.pm +++ b/lib/PublicInbox/RepobrowseGitAtom.pm @@ -41,8 +41,8 @@ sub call_git_atom { sub repo_root_url { my ($self, $req) = @_; - my $cgi = $req->{cgi}; - my $uri = $cgi->request_uri; + my $env = $req->{env}; + my $uri = $env->{REQUEST_URI}; $uri =~ s/\?.+\z//; # no query string my @uri = split(m!/+!, $uri); shift @uri; # leading slash @@ -52,7 +52,7 @@ sub repo_root_url { pop @extra; } pop @uri if $uri[-1] eq 'atom'; # warn if not equal? - $cgi->base . join('/', @uri); + PublicInbox::Repobrowse::base_url($env) . join('/', @uri); } sub git_atom_stream { |