From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/8] net_reader: do not set "SSL" fields for non-TLS
Date: Thu, 9 Sep 2021 05:24:58 +0000 [thread overview]
Message-ID: <20210909052505.7174-2-e@80x24.org> (raw)
In-Reply-To: <20210909052505.7174-1-e@80x24.org>
This will save a little bit of memory and IPC I/O for users
connecting to localhost and the majority of Tor .onions.
---
lib/PublicInbox/NetReader.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index 08166415..b5d14f13 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -79,6 +79,7 @@ sub mic_for ($$$$) { # mic = Mail::IMAPClient
Keepalive => 1, # SO_KEEPALIVE
%$common, # may set Starttls, Compress, Debug ....
};
+ $mic_arg->{Ssl} = 1 if $uri->scheme eq 'imaps';
require PublicInbox::IMAPClient;
my $mic = mic_new($self, $mic_arg, $sec, $uri) or
die "E: <$uri> new: $@\n";
@@ -197,9 +198,9 @@ sub nn_for ($$$$) { # nn = Net::NNTP
my $nn_arg = {
Port => $uri->port,
Host => $host,
- SSL => $uri->secure, # snews == nntps
%$common, # may Debug ....
};
+ $nn_arg->{SSL} = 1 if $uri->secure; # snews == nntps
my $sa = $self->{-proxy_cli};
%$nn_arg = (%$nn_arg, %$sa) if $sa;
my $nn = nn_new($nn_arg, $nntp_opt, $uri);
next prev parent reply other threads:[~2021-09-09 5:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 5:24 [PATCH 0/8] net_reader: simplify + fix bugs Eric Wong
2021-09-09 5:24 ` Eric Wong [this message]
2021-09-09 5:24 ` [PATCH 2/8] net_reader: set IMAPClient Keepalive flag late Eric Wong
2021-09-09 5:25 ` [PATCH 3/8] net_reader: preserve memoized IMAPClient arg for SOCKS Eric Wong
2021-09-09 5:25 ` [PATCH 4/8] net_reader: nntp_opt => cfg_opt Eric Wong
2021-09-09 5:25 ` [PATCH 5/8] net_reader: imap_opt " Eric Wong
2021-09-09 5:25 ` [PATCH 6/8] net_reader: combine Net::NNTP and IMAPClient args Eric Wong
2021-09-09 5:25 ` [PATCH 7/8] net_reader: improve naming of common args Eric Wong
2021-09-09 5:25 ` [PATCH 8/8] net_reader: support Mail::IMAPClient Ignoresizeerrors Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210909052505.7174-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).