From 78042ed9abb2bbe9783adcc485365a8672e4b36f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 19 May 2016 02:42:05 +0000 Subject: www: support downloading attachments This can be useful for lists where the convention is to attach (rather than inline) patches into the message body. --- lib/PublicInbox/Feed.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 0b864c2c..e2df97b1 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -315,10 +315,10 @@ sub add_to_feed { my $mid = $header_obj->header_raw('Message-ID'); defined $mid or return 0; $mid = PublicInbox::Hval->new_msgid($mid); - my $href = $mid->as_href; + my $href = $midurl.$mid->as_href; my $content = qq() . - PublicInbox::View::multipart_text_as_html($mime) . + PublicInbox::View::multipart_text_as_html($mime, $href) . ''; my $date = $header_obj->header('Date'); my $updated = feed_updated($date); @@ -346,7 +346,7 @@ sub add_to_feed { my $h = '[a-f0-9]'; my (@uuid5) = ($add =~ m!\A($h{8})($h{4})($h{4})($h{4})($h{12})!o); my $id = 'urn:uuid:' . join('-', @uuid5); - $fh->write(qq!!. + $fh->write(qq!!. "$id"); 1; } -- cgit v1.2.3-24-ge0c7