user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 5/5] net_reader: canonicalize URL args on add_url
  2021-06-12  0:10  6% [PATCH 0/5] lei ls-mail-source-related things Eric Wong
@ 2021-06-12  0:10  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-06-12  0:10 UTC (permalink / raw)
  To: meta

This fixes cases when users specify an IMAP or NNTP URL
with standard port numbers explicitly.

In other words, this allows users to use
"lei ls-mail-source nntps://public-inbox.org:563/" and
"lei ls-mail-source imaps://public-inbox.org:993/"
without hitting "BUG:" errors.
---
 lib/PublicInbox/NetReader.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index bcc6cbf0..30784199 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -371,8 +371,10 @@ sub add_url {
 	my ($self, $arg, $ls_ok) = @_;
 	my $uri;
 	if ($uri = imap_uri($arg, $ls_ok)) {
+		$_[1] = $$uri; # canonicalized
 		push @{$self->{imap_order}}, $uri;
 	} elsif ($uri = nntp_uri($arg, $ls_ok)) {
+		$_[1] = $$uri; # canonicalized
 		push @{$self->{nntp_order}}, $uri;
 	} else {
 		push @{$self->{unsupported_url}}, $arg;

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/5] lei ls-mail-source-related things
@ 2021-06-12  0:10  6% Eric Wong
  2021-06-12  0:10  7% ` [PATCH 5/5] net_reader: canonicalize URL args on add_url Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-06-12  0:10 UTC (permalink / raw)
  To: meta

A couple of minor usability things that'll make "lei import"
easier for bash completion users.

Eric Wong (5):
  lei: stop pager early on exit
  lei ls-mail-source: write through to URL folder cache
  t/lei-import-http: quiet unnecessary diag message
  lei import: use url_folder_cache for completion
  net_reader: canonicalize URL args on add_url

 lib/PublicInbox/LEI.pm             | 10 ++++++-
 lib/PublicInbox/LeiImport.pm       | 11 +++++---
 lib/PublicInbox/LeiIndex.pm        |  2 +-
 lib/PublicInbox/LeiLsMailSource.pm | 42 ++++++++++++++++++++++++++++--
 lib/PublicInbox/NetReader.pm       |  2 ++
 lib/PublicInbox/SharedKV.pm        | 13 +++++++--
 t/lei-import-http.t                |  2 --
 7 files changed, 71 insertions(+), 11 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-06-12  0:10  6% [PATCH 0/5] lei ls-mail-source-related things Eric Wong
2021-06-12  0:10  7% ` [PATCH 5/5] net_reader: canonicalize URL args on add_url Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).