Documentation/design_www.txt | 6 ++++-- lib/PublicInbox/View.pm | 27 +++++++++++++-------------- lib/PublicInbox/WWW.pm | 38 ++++++++++++++++---------------------- t/cgi.t | 8 +++++--- t/plack.t | 32 +++++++++++++++++++------------- t/view.t | 2 +- diff --git a/Documentation/design_www.txt b/Documentation/design_www.txt index 18b716c7981a7fab2dfe014a9bb2fe8e32fc3f35..3cf6ea85106534aa7a5ced99e57ac2c9f0b35e30 100644 --- a/Documentation/design_www.txt +++ b/Documentation/design_www.txt @@ -27,12 +27,14 @@ /$LISTNAME/$MESSAGE_ID -> 301 to /$LISTNAME/$MESSAGE_ID/ /$LISTNAME/$MESSAGE_ID/raw -> raw mbox /$LISTNAME/$MESSAGE_ID/R/ -> HTML reply instructions +# Covering up a pre-1.0 design mistake: +/$LISTNAME/$MESSAGE_ID/f/ -> 301 to /$LISTNAME/$MESSAGE_ID/ + ### Legacy endpoints (may be ambiguous given Message-IDs with similar suffixes) -/$LISTNAME/$MESSAGE_ID/f/ -> HTML content /$LISTNAME/m/$MESSAGE_ID/ -> 301 to /$LISTNAME/$MESSAGE_ID/ /$LISTNAME/m/$MESSAGE_ID.html -> 301 to /$LISTNAME/$MESSAGE_ID/ /$LISTNAME/m/$MESSAGE_ID.txt -> 301 to /$LISTNAME/$MESSAGE_ID/raw -/$LISTNAME/f/$MESSAGE_ID.html -> 301 to /$LISTNAME/$MESSAGE_ID/f/ +/$LISTNAME/f/$MESSAGE_ID.html -> 301 to /$LISTNAME/$MESSAGE_ID/ /$LISTNAME/f/$MESSAGE_ID.txt [1] -> 301 to /$LISTNAME/$MESSAGE_ID/raw /$LISTNAME/atom.xml [2] -> identical to /$LISTNAME/new.atom diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 2bf7cd50334c4067f57140293858e53fc048db1c..ac44d442b166ba1189772d363612a4c638450891 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -22,13 +22,13 @@ my $enc_utf8 = find_encoding('UTF-8'); # public functions: sub msg_html { - my ($ctx, $mime, $full_pfx, $footer) = @_; + my ($ctx, $mime, $footer) = @_; $footer = defined($footer) ? "\n$footer" : ''; my $hdr = $mime->header_obj; - headers_to_html_header($hdr, $full_pfx, $ctx) . - multipart_text_as_html($mime, $full_pfx) . + headers_to_html_header($hdr, $ctx) . + multipart_text_as_html($mime) . '
' . - html_footer($hdr, 1, $full_pfx, $ctx) . + html_footer($hdr, 1, $ctx) . $footer . '