From acf1505029e6d173ad7eb766dcf431502966cee4 Mon Sep 17 00:00:00 2001 From: ellie timoney Date: Wed, 13 Nov 2024 10:14:01 +1100 Subject: [PATCH] ServiceFactory: recognise 'https' service --- cassandane/Cassandane/ServiceFactory.pm | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/cassandane/Cassandane/ServiceFactory.pm b/cassandane/Cassandane/ServiceFactory.pm index 5507431ee6..fea981e5f6 100644 --- a/cassandane/Cassandane/ServiceFactory.pm +++ b/cassandane/Cassandane/ServiceFactory.pm @@ -60,17 +60,11 @@ sub create } # try and guess some service-specific defaults - if ($name =~ m/imaps/) + if ($name =~ m/imap(s?)/) { - return Cassandane::IMAPService->new( - argv => ['imapd', '-s'], - %params); - } - elsif ($name =~ m/imap/) - { - return Cassandane::IMAPService->new( - argv => ['imapd'], - %params); + my @argv = 'imapd'; + push @argv, '-s' if $1; + return Cassandane::IMAPService->new(argv => \@argv, %params); } elsif ($name =~ m/sync/) { @@ -78,11 +72,11 @@ sub create argv => ['imapd'], %params); } - elsif ($name =~ m/http/) + elsif ($name =~ m/http(s?)/) { - return Cassandane::Service->new( - argv => ['httpd'], - %params); + my @argv = 'httpd'; + push @argv, '-s' if $1; + return Cassandane::Service->new(argv => \@argv, %params); } elsif ($name =~ m/lmtp/) {