From 97510d7a92b4e44318d1917a54c70d536bbf46f2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 12 Oct 2021 11:47:05 +0000 Subject: www: _/text/config/raw Last-Modified: is mm->created_at This allows IMAP mirrors to keep UIDVALIDITY synchronized (and "LIST ACTIVE.TIMES" in NNTP). "lei add-external --mirror" will automatically set it, as will the combination of public-inbox-clone + public-inbox-index. This avoids the need for extra endpoints or config entries, at least... --- lib/PublicInbox/WwwText.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/PublicInbox/WwwText.pm') diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm index bb9a0a0f..8b929f74 100644 --- a/lib/PublicInbox/WwwText.pm +++ b/lib/PublicInbox/WwwText.pm @@ -8,6 +8,7 @@ use v5.10.1; use PublicInbox::Linkify; use PublicInbox::WwwStream; use PublicInbox::Hval qw(ascii_html prurl); +use HTTP::Date qw(time2str); use URI::Escape qw(uri_escape_utf8); use PublicInbox::GzipFilter qw(gzf_maybe); our $QP_URL = 'https://xapian.org/docs/queryparser.html'; @@ -171,6 +172,8 @@ sub inbox_config ($$$) { my ($ctx, $hdr, $txt) = @_; my $ibx = $ctx->{ibx}; push @$hdr, 'Content-Disposition', 'inline; filename=inbox.config'; + my $t = eval { $ibx->mm->created_at }; + push(@$hdr, 'Last-Modified', time2str($t)) if $t; my $name = dq_escape($ibx->{name}); my $inboxdir = '/path/to/top-level-inbox'; my $base_url = $ibx->base_url($ctx->{env}); -- cgit v1.2.3-24-ge0c7