Don't attempt to return HTTP 300 via Extmsg on it,
since whoever uses /raw is likely piping it to some
other command.
sub get_mid_txt {
my ($ctx) = @_;
require PublicInbox::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)
}
# /$INBOX/$MESSAGE_ID/ -> HTML content (short quotes)
$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/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
});
# redirect with newsgroup