-# redirect with newsgroup
-test_psgi($app, sub {
- my ($cb) = @_;
- my $from = 'http://example.com/inbox.test';
- my $to = 'http://example.com/test/';
- my $res = $cb->(GET($from));
+ my $res = $cb->(GET("$uri/test/crlf\@example.com/"));
+ is($res->code, 200, 'retrieved CRLF as HTML');
+ like($res->content, qr/mailto:me\@example/, 'no %40, per RFC 6068');
+ unlike($res->content, qr/\r/, 'no CR in HTML');
+ $res = $cb->(GET("$uri/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("$uri/test/bogus\@example.com/raw"));
+ is($res->code, 404, 'missing /raw is 404');
+
+ # redirect with newsgroup
+ my $from = "$uri/inbox.test";
+ my $to = "http://example.com/test/";
+ $res = $cb->(GET($from));