Plack::App::URLMap wipes out SCRIPT_NAME after we return,
and _html_end needs it for generating correct URLs
---
 lib/PublicInbox/WwwStream.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index e0823c8..6bca095 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -19,6 +19,10 @@ sub close {}
 
 sub new {
        my ($class, $ctx, $cb) = @_;
+
+       my %env = %{$ctx->{env}}; # full hash copy
+       $ctx->{env} = \%env;
+
        bless { nr => 0, cb => $cb || *close, ctx => $ctx }, $class;
 }
 
-- 
git-series 0.9.1

Reply via email to