lib/PublicInbox/LeiInput.pm | 2 ++ t/lei-import-http.t | 5 +++++ diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index 917f682ba97961c2d35e20935d0e8b69926fd1f9..85caac35aa24d8ab1f7d7d0e173377ca2c83ab40 100644 --- a/lib/PublicInbox/LeiInput.pm +++ b/lib/PublicInbox/LeiInput.pm @@ -229,6 +229,8 @@ push @{$sync->{no}}, $input; } } } elsif ($input_path =~ m!\Ahttps?://!i) { + # TODO: how would we detect r/w JMAP? + push @{$sync->{no}}, $input if $sync; prepare_http_input($self, $lei, $input_path) or return; } elsif ($input_path =~ s/\A([a-z0-9]+)://is) { my $ifmt = lc $1; diff --git a/t/lei-import-http.t b/t/lei-import-http.t index 35cbf3693e4dc8737ab889d82ace111accf1c0f6..6cb8a75387b26f0e93d8f03fe10e546552f3fae1 100644 --- a/t/lei-import-http.t +++ b/t/lei-import-http.t @@ -39,5 +39,10 @@ lei_ok 'q', 'm:20180720072141.GA15957@example'; $res = json_utf8->decode($lei_out); is($res->[0]->{'m'}, '20180720072141.GA15957@example', 'imported search result') or diag explain($res); + + ok(!lei(qw(import --mail-sync), "$url/x\@example.com/raw"), + '--mail-sync fails on HTTP'); + diag $lei_err; + }); done_testing;