diff options
author | Eric Wong <e@80x24.org> | 2023-01-11 10:55:39 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-01-11 18:53:05 +0000 |
commit | 20ab293a131f0ec228932bf3448d1b09e280672b (patch) | |
tree | d9ff2c63a209dcd52044461c2d8cee6e50d6f775 /lib/PublicInbox/WWW.pm | |
parent | 563206c94db52f7e0e6d899fef2681c9e63f8fee (diff) | |
download | public-inbox-20ab293a131f0ec228932bf3448d1b09e280672b.tar.gz |
To ensure users aren't abusing the ability to reuse Message-IDs, provide a convenient front-end to `lei mail-diff' from WWW. Most of the time it's just list-appended signatures, so I expect this to be useful for /all/ users.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index f861b192..9ffcb879 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -25,7 +25,7 @@ use PublicInbox::Eml; # TODO: consider a routing tree now that we have more endpoints: our $INBOX_RE = qr!\A/([\w\-][\w\.\-\+]*)!; our $MID_RE = qr!([^/]+)!; -our $END_RE = qr!(T/|t/|t\.mbox(?:\.gz)?|t\.atom|raw|)!; +our $END_RE = qr!(T/|t/|d/|t\.mbox(?:\.gz)?|t\.atom|raw|)!; our $ATTACH_RE = qr!([0-9][0-9\.]*)-($PublicInbox::Hval::FN)!; our $OID_RE = qr![a-f0-9]{7,}!; @@ -452,6 +452,10 @@ sub msg_page { # legacy, but no redirect for compatibility: 'f/' eq $e and return get_mid_html($ctx); + if ($e eq 'd/') { + require PublicInbox::View; + return PublicInbox::View::diff_msg($ctx); + } r404($ctx); } |