]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Feed.pm
wwwstream: improve documentation and variable naming
[public-inbox.git] / lib / PublicInbox / Feed.pm
index a697a4326fcaefcb64f2be0a17432f71cd1a2163..25fec10a0ea3095f5b81bce84cd220f3deddfa26 100644 (file)
@@ -59,12 +59,12 @@ sub new_html {
        }
        $ctx->{-html_tip} = '<pre>';
        $ctx->{-upfx} = '';
+       $ctx->{-hr} = 1;
        PublicInbox::WwwStream->response($ctx, 200, sub {
                while (my $path = shift @paths) {
                        my $m = do_cat_mail($ctx->{-inbox}, $path) or next;
                        my $more = scalar @paths;
                        my $s = PublicInbox::View::index_entry($m, $ctx, $more);
-                       $s .= '</pre>' unless $more;
                        return $s;
                }
                new_html_footer($ctx, $last);
@@ -137,7 +137,7 @@ sub emit_atom_thread {
        my $fh = $cb->([200, ['Content-Type' => 'application/atom+xml']]);
        my $ibx = $ctx->{-inbox};
        my $html_url = $ibx->base_url($ctx->{env});
-       $html_url .= PublicInbox::Hval->new_msgid($mid)->as_href;
+       $html_url .= PublicInbox::Hval->new_msgid($mid)->{href};
 
        $feed_opts->{url} = $html_url;
        $feed_opts->{emit_header} = 1;
@@ -266,10 +266,9 @@ sub feed_entry {
        my $midurl = $feed_opts->{midurl};
 
        my $header_obj = $mime->header_obj;
-       my $mid = $header_obj->header_raw('Message-ID');
-       defined $mid or return;
+       my $mid = mid_clean($header_obj->header_raw('Message-ID'));
        $mid = PublicInbox::Hval->new_msgid($mid);
-       my $href = $midurl . $mid->as_href . '/';
+       my $href = $midurl . $mid->{href}. '/';
 
        my $date = $header_obj->header('Date');
        my $updated = feed_updated($date);