diff options
author | Eric Wong <e@80x24.org> | 2022-05-08 22:10:31 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-05-08 23:02:07 +0000 |
commit | 37ee470e1f4a279171452418f013bf114bab343f (patch) | |
tree | a3d1257d401fe4dad4e821b5fe561ffcff024169 /lib/PublicInbox | |
parent | c589b65c54ce2507f38114990e3a722fd6cdfe3d (diff) | |
download | public-inbox-37ee470e1f4a279171452418f013bf114bab343f.tar.gz |
And also replace an unnecessary substitution (s///) op with a match (m//). Fixes: 93a7b219d58aad86 ("public-inbox-netd: a multi-protocol superserver")
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/Daemon.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index 13cce1ec..d08ce0f9 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -618,9 +618,9 @@ sub daemon_loop ($) { while (my ($k, $v) = each %tls_opt) { my $l = $k; $l =~ s!\A([^:]+)://!!; - my $scheme = $1; + my $scheme = $1 // ''; my $xn = $xnetd->{$l} // $xnetd->{''}; - if ($scheme =~ s!\A(?:https|imaps|nntps)!!) { + if ($scheme =~ m!\A(?:https|imaps|nntps)!) { $post_accept{$l} = tls_start_cb($v, $xn->{post_accept}); } elsif ($xn->{tlsd}) { # STARTTLS, $k eq '' is OK $xn->{tlsd}->{accept_tls} = $v; |