diff options
author | Eric Wong <e@80x24.org> | 2015-08-23 00:02:34 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-23 00:02:50 +0000 |
commit | f1747921cf00e251ea0d814d732fb8c9dc9e39cd (patch) | |
tree | 1376396b1474ed09f352f4e786a3e4eaada9100b /lib/PublicInbox/WWW.pm | |
parent | 539f90b266ff9cf476234d87036157c008569835 (diff) | |
download | public-inbox-f1747921cf00e251ea0d814d732fb8c9dc9e39cd.tar.gz |
This improves compatibility and allows individual messages to be concatenated into an existing mbox without further modifications. "git format-patch" does something similar (but does not do "From " line escaping(!))
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 33c71101..86c64fb6 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -157,11 +157,12 @@ sub mid2blob { } } -# /$LISTNAME/m/$MESSAGE_ID.txt -> raw original +# /$LISTNAME/m/$MESSAGE_ID.txt -> raw mbox sub get_mid_txt { my ($ctx, $cgi) = @_; - my $x = mid2blob($ctx); - $x ? [ 200, [ 'Content-Type' => 'text/plain' ], [ $$x ] ] : r404(); + my $x = mid2blob($ctx) or return r404(); + require PublicInbox::Mbox; + PublicInbox::Mbox::emit1($x); } # /$LISTNAME/m/$MESSAGE_ID.html -> HTML content (short quotes) |