* [PATCH 0/5] various minor annoyance fixups
@ 2022-08-20 8:01 7% Eric Wong
2022-08-20 8:01 6% ` [PATCH 5/5] www: mbox* drop unneeded {base_url} memoizations Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-08-20 8:01 UTC (permalink / raw)
To: meta
Some things I noticed while reading the code, some things
I noticed while looking at WWW in w3m. There were more cleanups
related to {base_url} and redundancies in WWW that I could
probably get rid of, but some had unintended side-effects :x
or required more refactoring/cleanups.
Eric Wong (5):
import: take advantage of some Perl 5.10.x features
imap: remove some intermediate arrays
view: do not show pagination footer for small inboxes
www: use absolute URLs for coderepo URLs
www: mbox* drop unneeded {base_url} memoizations
lib/PublicInbox/ExtSearch.pm | 4 +++-
lib/PublicInbox/IMAP.pm | 4 ++--
lib/PublicInbox/Import.pm | 23 ++++++++++-------------
lib/PublicInbox/Inbox.pm | 2 ++
lib/PublicInbox/Mbox.pm | 3 +--
lib/PublicInbox/MboxGz.pm | 3 +--
lib/PublicInbox/View.pm | 9 +++------
lib/PublicInbox/WwwStream.pm | 16 ++++++++--------
lib/PublicInbox/WwwText.pm | 12 ++----------
9 files changed, 32 insertions(+), 44 deletions(-)
^ permalink raw reply [relevance 7%]
* [PATCH 5/5] www: mbox* drop unneeded {base_url} memoizations
2022-08-20 8:01 7% [PATCH 0/5] various minor annoyance fixups Eric Wong
@ 2022-08-20 8:01 6% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-20 8:01 UTC (permalink / raw)
To: meta
That field is not needed since List-* and Archived-At headers
are no longer appended as of commit:
1bf653ad139bf7bb (nntp+www: drop List-* and Archived-At headers, 2020-12-10)
---
lib/PublicInbox/Mbox.pm | 3 +--
lib/PublicInbox/MboxGz.pm | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm
index e65f38f0..2ef8ff2b 100644
--- a/lib/PublicInbox/Mbox.pm
+++ b/lib/PublicInbox/Mbox.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# Streaming interface for mboxrd HTTP responses
@@ -82,7 +82,6 @@ sub no_over_raw ($) {
# /$INBOX/$MESSAGE_ID/raw
sub emit_raw {
my ($ctx) = @_;
- $ctx->{base_url} = $ctx->{ibx}->base_url($ctx->{env});
my $over = $ctx->{ibx}->over or return no_over_raw($ctx);
my ($id, $prev);
my $mip = $ctx->{next_arg} = [ $ctx->{mid}, \$id, \$prev ];
diff --git a/lib/PublicInbox/MboxGz.pm b/lib/PublicInbox/MboxGz.pm
index 3ed33867..56f5adcf 100644
--- a/lib/PublicInbox/MboxGz.pm
+++ b/lib/PublicInbox/MboxGz.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
package PublicInbox::MboxGz;
use strict;
@@ -22,7 +22,6 @@ sub async_next ($) {
sub mbox_gz {
my ($self, $cb, $fn) = @_;
$self->{cb} = $cb;
- $self->{base_url} = $self->{ibx}->base_url($self->{env});
$self->{gz} = PublicInbox::GzipFilter::gzip_or_die();
$fn = to_filename($fn // '') // 'no-subject';
# http://www.iana.org/assignments/media-types/application/gzip
^ permalink raw reply related [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-20 8:01 7% [PATCH 0/5] various minor annoyance fixups Eric Wong
2022-08-20 8:01 6% ` [PATCH 5/5] www: mbox* drop unneeded {base_url} memoizations 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).