-# Redirect to another public-inbox which is mapped by $pi_config
-# TODO: prompt for inbox-switching
-sub r302 {
- my ($inbox, $mid) = @_;
- my $url = $inbox->base_url . uri_escape_utf8($mid) . '/';
- [ 302,
- [ 'Location' => $url, 'Content-Type' => 'text/plain' ],
- [ "Redirecting to\n$url\n" ] ]
+sub exact {
+ my ($ctx, $found, $mid) = @_;
+ my $href = mid_href($mid);
+ my $html = ascii_html($mid);
+ my $title = "<$html> found in ";
+ my $end = @$found == 1 ? 'another inbox' : 'other inboxes';
+ $ctx->{-title_html} = $title . $end;
+ $ctx->{-upfx} = '../';
+ my $ext_urls = ext_urls($ctx, $mid, $href, $html);
+ my $code = (@$found == 1 && $ext_urls eq '') ? 200 : 300;
+ $ctx->{-html_tip} = join('',
+ "<pre>Message-ID: <$html>\nfound in $end:\n\n",
+ (map {
+ my $u = $_->base_url;
+ qq(<a\nhref="$u$href/">$u$html/</a>\n)
+ } @$found),
+ $ext_urls, '</pre>');
+ html_oneshot($ctx, $code);