diff options
author | Eric Wong <e@80x24.org> | 2016-07-02 07:56:34 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-02 07:57:27 +0000 |
commit | e358bd7a3833f8c5bf9db57d228888f9c5f3692e (patch) | |
tree | 4822b8d06e92f78ea3861d83f8c999015ccae397 /lib/PublicInbox/WwwStream.pm | |
parent | 0f9091f381191484f1a5ed5189d23cbfa88de6fc (diff) | |
download | public-inbox-e358bd7a3833f8c5bf9db57d228888f9c5f3692e.tar.gz |
This is lighter and we can work further towards eliminating our Plack::Request dependency entirely.
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index fdab4da3..be6ce2e6 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -62,13 +62,8 @@ sub _html_end { my $obj = $ctx->{-inbox}; my $desc = ascii_html($obj->description); - # FIXME: cleanup - my $env = $ctx->{env}; - my $scheme = $env->{'psgi.url_scheme'}; - my $host_port = $env->{HTTP_HOST} || - "$env->{SERVER_NAME}:$env->{SERVER_PORT}"; - my $http = "$scheme://$host_port".($env->{SCRIPT_NAME} || '/'); - $http = URI->new($http . $obj->{name})->canonical->as_string; + my $http = $obj->base_url($ctx->{env}); + chop $http; my %seen = ( $http => 1 ); my @urls = ($http); foreach my $u (@{$obj->cloneurl}) { |