lib/PublicInbox/WWW.pm | 2 +- t/plack.t | 2 ++ diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 456692a3a7391f0bf7f330d1bcb2190f5b2b43e2..8f4bfd0f36bf293b9df1b89a2d74229b195e4bf0 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -272,7 +272,7 @@ # /$INBOX/$MESSAGE_ID/raw -> raw mbox sub get_mid_txt { my ($ctx) = @_; require PublicInbox::Mbox; - PublicInbox::Mbox::emit_raw($ctx) || r404($ctx); + PublicInbox::Mbox::emit_raw($ctx) || r(404); } # /$INBOX/$MESSAGE_ID/ -> HTML content (short quotes) diff --git a/t/plack.t b/t/plack.t index db72e6cc3bcae16eac8b432e5e5c084cdef02484..40ff2baa72739e72d80b2b2969327b899a7df37e 100644 --- a/t/plack.t +++ b/t/plack.t @@ -82,6 +82,8 @@ unlike($res->content, qr/\r/, 'no CR in HTML'); $res = $cb->(GET('http://example.com/test/crlf@example.com/raw')); is($res->code, 200, 'retrieved CRLF raw'); like($res->content, qr/\r/, 'CR preserved in raw message'); + $res = $cb->(GET('http://example.com/test/bogus@example.com/raw')); + is($res->code, 404, 'missing /raw is 404'); }); # redirect with newsgroup