X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FMbox.pm;h=88daba752153385ed74656cae0699078a65139c3;hb=31c516e54a6fd9df6122aaf3383f95ce9fc06834;hp=2565ea58a07d327b94c8947ceb705427c17fc0fb;hpb=71d0581a309ca83cf3be538141435111db8ed290;p=public-inbox.git diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm index 2565ea58..88daba75 100644 --- a/lib/PublicInbox/Mbox.pm +++ b/lib/PublicInbox/Mbox.pm @@ -12,8 +12,12 @@ require Email::Simple; sub emit1 { my ($ctx, $msg) = @_; $msg = Email::Simple->new($msg); - # single message should be easily renderable in browsers - [200, ['Content-Type', 'text/plain'], [ msg_str($ctx, $msg)] ] + + # single message should be easily renderable in browsers, + # unless obfuscation is enabled :< + [ 200, [ 'Content-Type', + $ctx->{-inbox}->{obfuscate} ? 'application/mbox' : 'text/plain' ], + [ msg_str($ctx, $msg)] ] } sub msg_str {