Eric Wong [Wed, 15 Jun 2016 00:14:23 +0000 (00:14 +0000)]
learn: remove IPC::Run dependency
We'll be relying on our spawn implementation, for now;
since it'll be consistent with the rest of our code and
can optionally take advantage of vfork.
Eric Wong [Wed, 15 Jun 2016 00:14:22 +0000 (00:14 +0000)]
t/feed.t: make IPC::Run usage optional
Since ssoma is optional, here, IPC::Run shall also be optional.
(And it may be removed entirely in the future).
Eric Wong [Wed, 15 Jun 2016 00:14:21 +0000 (00:14 +0000)]
drop dependency on File::Path::Expand
We still pull it in via Email::LocalDelivery, but that
dependency will go away, soon.
Eric Wong [Tue, 14 Jun 2016 06:54:57 +0000 (06:54 +0000)]
nntp: do not double-encode UTF-8 body
Or whatever the appropriate Perl terminology, is...
And we will need to do something appropriate for other
encodings, too. I still barely understand Perl Unicode
despite attempting to understand the docs over the years..
Eric Wong [Mon, 13 Jun 2016 22:56:27 +0000 (22:56 +0000)]
doc: systemd examples should only kill one process
For our daemons, killing only the master process is enough.
Killing the entire control group (as done by default in
systemd) may cause subprocesses such as git to shut down
unexpectedly.
Having systemd kill workers directly will also cause an
immediate shutdown since the master would've already signaled
the workers; and workers will die after two shutdown requests.
Eric Wong [Sun, 12 Jun 2016 04:46:38 +0000 (04:46 +0000)]
view: msg_html uses getline body to reduce latency
We need to ensure we show the message body ASAP since
the thread generation via Xapian could take a while
and maybe even raise an exception or crash.
Eric Wong [Mon, 13 Jun 2016 04:53:30 +0000 (04:53 +0000)]
examples: systemd socket and service definitions for daemons
Since our daemons are built to take advantage of socket activation,
provide example files to allow systems administrators to hit the
ground running with systemd.
Example init files for other systems greatly appreciated.
Eric Wong [Sat, 11 Jun 2016 21:56:31 +0000 (21:56 +0000)]
daemon: reset unused signal handlers to default in child
They're effectively noops anyways, and we don't want to be
holding a reference to the read end of the parent pipe.
Eric Wong [Fri, 10 Jun 2016 07:23:24 +0000 (07:23 +0000)]
unsubscribe: HTML encode undecryptable username
Otherwise, URLs can be crafted to inject HTML.
Eric Wong [Thu, 9 Jun 2016 00:57:40 +0000 (00:57 +0000)]
doc: update links to HTTPS sites in INSTALL and README
Thanks to Let's Encrypt and getssl, we can afford to have
HTTPS for our own hosting, and www.gnu.org has been accessible
over HTTPS for a long while.
While we're at it, update the copyright years, too.
Eric Wong [Tue, 7 Jun 2016 13:39:44 +0000 (13:39 +0000)]
unsubscribe: fix off-by-one error
Oops, pesky users of single-character email addresses!
Eric Wong [Tue, 7 Jun 2016 13:11:43 +0000 (13:11 +0000)]
unsubscribe.psgi: disable confirmation
This makes unsubscribing easier and frictionless.
Eric Wong [Tue, 7 Jun 2016 13:06:57 +0000 (13:06 +0000)]
unsubscribe.milter: implement archive blacklist
We don't want people following links from archivers and
breaking archival.
Eric Wong [Tue, 7 Jun 2016 12:57:42 +0000 (12:57 +0000)]
Merge branch 'unsubscribe'
* unsubscribe:
unsubscribe.milter: use default postfork dispatcher
unsubscribe: prevent decrypt from showing random crap
examples/unsubscribe-psgi@.service: disable worker processes
unsubscribe: bad URL fixup
unsubscribe: get off mah lawn^H^H^Hist
Eric Wong [Tue, 7 Jun 2016 08:15:50 +0000 (08:15 +0000)]
view: be sure reply text describes plain-text
While we may end up mirroring lists which allow HTML mail,
encourage plain-text for compatibility since all current
inboxes we host are text-only.
Eric Wong [Tue, 7 Jun 2016 07:54:05 +0000 (07:54 +0000)]
view: remove trailing whitespace from reply command
Oops, needless waste of space.
Eric Wong [Tue, 7 Jun 2016 07:14:01 +0000 (07:14 +0000)]
view: escape From name properly for title
Oops :x Add an additional test for live data for any
unprintable characters, too, since this could be a dangerous
source of HTML injection.
Eric Wong [Sun, 5 Jun 2016 21:24:17 +0000 (21:24 +0000)]
view: inline message reply into message view
This should reduce link following for replies and improve
visibility. This should also reduce cache overhead/footprint
for crawlers.
Eric Wong [Thu, 2 Jun 2016 00:09:13 +0000 (00:09 +0000)]
www: force two element key-value pairs in query
Oops, this quiets down a warning seen in logs.
Eric Wong [Mon, 30 May 2016 04:50:33 +0000 (04:50 +0000)]
use utf8::{encode,decode} for in-place transforms
No need to duplicate the string when transforming it;
learned from studying SpamAssassin 3.4.1
Eric Wong [Mon, 30 May 2016 04:39:57 +0000 (04:39 +0000)]
http: yield body->getline running time
We cannot let a client monopolize the single-threaded server
even if it can drain the socket buffer faster than we can
emit data.
While we're at it, acknowledge the this behavior (which happens
naturally) in httpd/async.
The same idea is present in NNTP for the long_response code.
This is the HTTP followup to:
commit
0d0fde0bff97 ("nntp: introduce long response API for streaming")
commit
79d8bfedcdd2 ("nntp: avoid signals for long responses")
Eric Wong [Mon, 30 May 2016 02:10:36 +0000 (02:10 +0000)]
script/*{mda,learn}: no strict params for Email::MIME::ContentType
User input is imperfect, do not pollute our mail logs with
warnings we cannot fix. This is documented in the
Email::MIME::ContentType manpage so it should remain supported.
Eric Wong [Mon, 30 May 2016 01:57:52 +0000 (01:57 +0000)]
www: remove a few more Plack::Request dependencies
Still a work in progress, but SearchView no longer depends
on Plack::Request at all and Feed is getting there.
We now parse all query parameters up front, but we may do
that lazily again in the future.
Eric Wong [Mon, 30 May 2016 01:01:09 +0000 (01:01 +0000)]
www: remove gratuitous use of Plack::Request methods
Accessing $env directly is faster and we will eventually
remove all Plack::Request dependencies.
Eric Wong [Mon, 30 May 2016 00:51:44 +0000 (00:51 +0000)]
git-http-backend: remove dependency on Plack::Request
Plack::Request is unnecessary overhead for this given the
strictness of git-http-backend. Furthermore, having to make
commit
311c2adc8c63 ("avoid Plack::Request parsing body")
to avoid tempfiles should not have been necessary.
Eric Wong [Sun, 29 May 2016 04:10:48 +0000 (04:10 +0000)]
nntp: fix for missing articles/bodies/heads
Oops, we totally forgot to automate testing for this :x
Eric Wong [Sun, 29 May 2016 04:09:14 +0000 (04:09 +0000)]
inbox: drop references ASAP for search and msgmap
We can't leave them lingering in the parent process at
all due to the risk of corruption with multiple processes.
Eric Wong [Sun, 29 May 2016 02:57:57 +0000 (02:57 +0000)]
searchmsg: all timestamps stored in Xapian are UTC
We cannot have strftime using the local timezone for %z.
This fixes output when a server is not running UTC.
Eric Wong [Sun, 29 May 2016 02:17:58 +0000 (02:17 +0000)]
INSTALL: note Debian bug #808610 corruption
Ugh, this is a nasty corruption bug and I can't recommend
this project for Debian 8.0 users without documenting this.
Eric Wong [Sun, 29 May 2016 02:07:47 +0000 (02:07 +0000)]
txt2pre: remove CGI.pm dependency
It's no longer a part of the stock Perl distribution,
and we don't need a whole module for just one function.
Eric Wong [Sat, 28 May 2016 01:57:14 +0000 (01:57 +0000)]
remove redundant NewsGroup class
Most of its functionality is in the PublicInbox::Inbox class.
While we're at it, we no longer auto-create newsgroup names
based on the inbox name, since newsgroup names probably deserve
some thought when it comes to hierarchy.
Eric Wong [Sat, 28 May 2016 01:57:13 +0000 (01:57 +0000)]
config: remove try_cat
It's moved into the Inbox module and we no longer use it
in WWW
Eric Wong [Sat, 28 May 2016 01:57:12 +0000 (01:57 +0000)]
www: remove footer_html support
I haven't used it in a while and the existing "description"
is probably good enough.
If we support it again, it should be plain-text + auto-linkified
for ease-of-maintenance and consistency.
Eric Wong [Sat, 28 May 2016 01:57:11 +0000 (01:57 +0000)]
examples: config no longer supports atomUrl
We build the atomUrl from url, which can change
dynamically depending on what PSGI environment it
is called under.
Eric Wong [Sat, 28 May 2016 01:57:10 +0000 (01:57 +0000)]
Makefile.PL: allow N to be overridden
Relying on the number of processors isn't a great idea
since some of our tests rely on delays to test blocking
and slow client behavior.
Eric Wong [Sat, 28 May 2016 01:57:09 +0000 (01:57 +0000)]
http: clarify comments about layering violation
It's a low priority, but acknowledge it.
Eric Wong [Sat, 28 May 2016 01:57:08 +0000 (01:57 +0000)]
t/plack: ensure we can cascade on common endpoints
We don't serve things like robots.txt, favicon.ico, or
.well-known/ endpoints ourselves, but ensure we can be
used with Plack::App::Cascade for others.
Eric Wong [Fri, 27 May 2016 08:57:42 +0000 (08:57 +0000)]
config: fix NewsWWW fallback for newsgroups in HTTP URLs
Oops, added a test to prevent regressions while we're at it.
Eric Wong [Fri, 27 May 2016 08:20:59 +0000 (08:20 +0000)]
git-http-backend: close pipe for generic PSGI on errors
The generic PSGI code needs to avoid resource leaks if
smart cloning is disabled (due to resource contraints).
Eric Wong [Fri, 27 May 2016 08:20:58 +0000 (08:20 +0000)]
git-http-backend: move real close to GetlineBody
This makes more sense as it keeps management of rpipe
nice and neat.
Eric Wong [Fri, 27 May 2016 08:03:31 +0000 (08:03 +0000)]
unsubscribe.milter: use default postfork dispatcher
Let postfix (or sendmail :P) control the concurrency limit
instead of doing it ourselves. This is necessary because SMTP
connections are completely synchronous at this point and a
slow/idle SMTP connection will monopolize the worker process.
Eric Wong [Fri, 27 May 2016 07:23:18 +0000 (07:23 +0000)]
httpd/async: do not needlessly weaken
The restart_read callback has no chance of circular reference,
and weakening $self before we create it can cause $self to
be undefined inside the callback (seen during stress testing).
Fixes: 395406118cb2 ("httpd/async: prevent circular reference")
Eric Wong [Fri, 27 May 2016 05:59:16 +0000 (05:59 +0000)]
git-http-backend: fix aborts for generic PSGI clone
We need to avoid circular references in the generic PSGI layer,
do it by abusing DESTROY.
Eric Wong [Fri, 27 May 2016 05:59:15 +0000 (05:59 +0000)]
http: avoid circular reference for getline responses
Lightly tested, this seems to work when mass-aborting
responses. Will still need to automate the testing...
Eric Wong [Fri, 27 May 2016 05:59:14 +0000 (05:59 +0000)]
httpd/async: prevent circular reference
We must avoid circular references which can cause leaks in
long-running processes. This callback is dangerous since
it may never be called to properly terminate everything.
Eric Wong [Wed, 25 May 2016 01:44:46 +0000 (01:44 +0000)]
remove Email::Address dependency
git has stricter requirements for ident names (no '<>')
which Email::Address allows.
Even in 1.908, Email::Address also has an incomplete fix for
CVE-2015-7686 with a DoS-able regexp for comments. Since we
don't care for or need all the RFC compliance of Email::Address,
avoiding it entirely may be preferable.
Email::Address will still be installed as a requirement for
Email::MIME, but it is only used by the
Email::MIME::header_str_set which we do not use
Eric Wong [Tue, 24 May 2016 03:41:53 +0000 (03:41 +0000)]
git-http-backend: use qspawn to limit running processes
Having an excessive amount of git-pack-objects processes is
dangerous to the health of the server. Queue up process spawning
for long-running responses and serve them sequentially, instead.
Eric Wong [Tue, 24 May 2016 03:41:52 +0000 (03:41 +0000)]
http: fix various race conditions
We no longer override Danga::Socket::event_write and instead
re-enable reads by queuing up another callback in the $close
response callback. This is necessary because event_write may not be
completely done writing a response, only the existing buffered data.
Furthermore, the {closed} field can almost be set at any time when
writing, so we must check it before acting on pipelined requests as
well as during write callbacks in more().
Eric Wong [Tue, 24 May 2016 03:41:51 +0000 (03:41 +0000)]
standardize timer-related event-loop code
Standardize the code we have in place to avoid creating too many
timer objects. We do not need exact timers for things that don't
need to be run ASAP, so we can play things fast and loose to avoid
wasting power with unnecessary wakeups.
We only need two classes of timers:
* asap - run this on the next loop tick, after operating on
@Danga::Socket::ToClose to close remaining sockets
* later - run at some point in the future. It could be as
soon as immediately (like "asap"), and as late as 60s into
the future.
In the future, we support an "emergency" switch to fire "later"
timers immediately.
Eric Wong [Mon, 23 May 2016 08:21:08 +0000 (08:21 +0000)]
http: avoid uninitialized variable
Oops, really gotta start checking logs in tests :x
Fixes: bb38f0fcce739 ("http: chunk in the server, not middleware")
Eric Wong [Mon, 23 May 2016 07:19:45 +0000 (07:19 +0000)]
http: chunk in the server, not middleware
Since PSGI does not require Transfer-Encoding: chunked or
Content-Length, we cannot expect random apps we host to chunk
their responses.
Thus, to improve interoperability, chunk at the HTTP layer like
other PSGI servers do. I'm chosing a more syscall-intensive method
(via multiple send(...MSG_MORE) for now to reduce copy + packet
overhead.
Eric Wong [Mon, 23 May 2016 04:01:14 +0000 (04:01 +0000)]
git-http-backend: refactor to support cleanup
We will have clients dropping connections during long clone
and fetch operations; so do not retain references holding
backend processes once we detect a client has dropped.
Eric Wong [Mon, 23 May 2016 03:57:45 +0000 (03:57 +0000)]
git-http-backend: avoid Plack::Request parsing body
Only check query parameters since there's no useful body
in there.
Eric Wong [Mon, 23 May 2016 01:33:40 +0000 (01:33 +0000)]
TODO: update linkification notes
Some readers will want to use "HTTPS Everywhere" conveniently;
and I will support it.
Eric Wong [Mon, 23 May 2016 01:21:00 +0000 (01:21 +0000)]
git-http-backend: cleanup vestigial the process limiter code
This bit is still being redone to support gigantic repos.
Eric Wong [Mon, 23 May 2016 01:17:28 +0000 (01:17 +0000)]
config: use popen_rd when spawning `git config'
We may spawn this in a large server process, so be sure
to take advantage of the optional vfork() support when
for folks who set PERL_INLINE_DIRECTORY.
Eric Wong [Mon, 23 May 2016 01:14:32 +0000 (01:14 +0000)]
t/config.t: remove GIT_DIR usage in test
Followup-to: commit 24e0219f364ed402f9136227756e0f196dc651aa
("remove GIT_DIR env usage in favor of --git-dir")
Eric Wong [Mon, 23 May 2016 01:00:15 +0000 (01:00 +0000)]
daemon: ignore SIGWINCH when connected to terminal
Users may change terminal sizes if the process is connected to a
terminal, so we can't reasonably expect SIGWINCH to work as
intended.
Eric Wong [Sun, 22 May 2016 20:59:25 +0000 (20:59 +0000)]
spawn: note we do not use absolute paths within our code
We can't rely on absolute paths when installed on other
systems.
Unfortunately, mlmmj-* requires them, but none of the core
code will use it.
Eric Wong [Sun, 22 May 2016 20:44:34 +0000 (20:44 +0000)]
www: avoid warnings on bad offsets for Xapian
The offset argument must be an integer for Xapian,
however users (or bots) type the darndest things.
AFAIK this has no security implications besides triggering
a warning (which could lead to out-of-space-errors)
Eric Wong [Sun, 22 May 2016 09:06:03 +0000 (09:06 +0000)]
git-http-backend: switch to async_pass
This simplifies the code somewhat; but it could probably
still be made simpler. It will need to support command
queueing for expensive commands so expensive processes
can be queued up.
Eric Wong [Sun, 22 May 2016 03:58:00 +0000 (03:58 +0000)]
http: rework async_pass support
Unfortunately, the original design did not work because
middleware can wrap the response body and make `async_pass'
invisible to HTTP.pm
Eric Wong [Sun, 22 May 2016 07:59:52 +0000 (07:59 +0000)]
git-http-backend: simplify dumb serving
We can rely entirely on getline + close callbacks
and be compatible with 100% of PSGI servers.
Eric Wong [Sun, 22 May 2016 07:55:50 +0000 (07:55 +0000)]
git-http-backend: remove process limit
We will figure out a different way to avoid overloading...
Eric Wong [Sun, 22 May 2016 07:49:04 +0000 (07:49 +0000)]
t/spawn.t: additional tests for popen_rd
We need to ensure $? is set properly for users.
Eric Wong [Sun, 22 May 2016 06:17:30 +0000 (06:17 +0000)]
http: pass reference to Danga::Socket::write
This can avoid an expensive copy for big strings.
Eric Wong [Sun, 22 May 2016 06:17:29 +0000 (06:17 +0000)]
http: fix typo: write_buf => write_buf_size
Otherwise, we get deep recursion as we keep calling
recursively on giant responses
Eric Wong [Sun, 22 May 2016 00:33:59 +0000 (00:33 +0000)]
http: async getline supports push_back_read
Sometimes we need to read something to ensure it's a successful
response.
Eric Wong [Sat, 21 May 2016 23:45:27 +0000 (23:45 +0000)]
http: support async_pass for Danga::Socket
This will allow us to minimize buffering after we wait
(possibly a long time) for readability. This also greatly
reduces the amount of Danga::Socket-specific knowledge we
have in our PSGI code, making it easier for others to
understand.
Eric Wong [Sat, 21 May 2016 10:52:18 +0000 (10:52 +0000)]
import: avoid needless git update-server-info
We don't need to update-server-info (or read-tree) if fast
import was spawned for removals and no changes were made.
Eric Wong [Sat, 21 May 2016 10:37:09 +0000 (10:37 +0000)]
daemon: simplify forking
We shouldn't need sigprocmask unless we're running multiple
native threads or using vfork, neither of which is the case,
here.
Eric Wong [Sat, 21 May 2016 05:27:06 +0000 (05:27 +0000)]
localize $/ in more places to avoid potential problems
This hopefully makes the intent of the code clearer, too.
The the HTTP use of the numeric reference for getline
caused problems in Git.pm, already.
Eric Wong [Sat, 21 May 2016 04:35:04 +0000 (04:35 +0000)]
unsubscribe: prevent decrypt from showing random crap
Wow, I don't know crypto at all.
Eric Wong [Sat, 21 May 2016 04:19:03 +0000 (04:19 +0000)]
examples/unsubscribe-psgi@.service: disable worker processes
This unsubscribe PSGI endpoint should never incur enough load to
justify using multiple worker processes. If it's unstable and
crashes, systemd can automatically restart it.
Eric Wong [Sat, 21 May 2016 04:12:45 +0000 (04:12 +0000)]
unsubscribe: bad URL fixup
Fixup a comment about s/query string/PATH_INFO/ while
we're at it, as pre-published versions of this used
query strings before I determined it could be harder
to copy+paste URLs with query parameters in them.
Eric Wong [Sat, 21 May 2016 03:03:17 +0000 (03:03 +0000)]
mbox: switch generation over to pull model
This allows us to easily provide gigantic inboxes
with proper backpressure handling for slow clients.
It also eliminates public-inbox-httpd and Danga::Socket-specific
knowledge from this class, making it easier to follow for
those used to generic PSGI applications.
Eric Wong [Sat, 21 May 2016 03:03:16 +0000 (03:03 +0000)]
http: reduce over-buffering for getline responses
By switching to a "pull"-based I/O model for reading
application responses, we should be able to throttle
buffering to slow clients more effectively and avoid
wasting precious RAM.
This will also allow us to more Danga::Socket-specific
knowledge out of the PSGI application and keep it
confined to PublicInbox::HTTP.
Eric Wong [Fri, 20 May 2016 22:35:16 +0000 (22:35 +0000)]
ssoma-replay: use TMPDIR for temporary path
Otherwise, tempfile() will use the current working directory,
which may not be writable.
Eric Wong [Wed, 18 May 2016 01:23:05 +0000 (01:23 +0000)]
unsubscribe: get off mah lawn^H^H^Hist
While public-inbox is intended primarily for archival,
SMTP list subscriptions are still in use in most places
and users are likely to want a good unsubscribe mechanism.
HTTP (or HTTPS) links in the List-Unsubscribe header are
often preferable since some users may use an incorrect
email address for mailto: links.
Thus, it is useful to provide an example which generates an
HTTPS link for users to click on. The default .psgi requires
a POST confirmation (as destructive actions with GET are
considered bad practice). However, the "confirm" parameter
may be disabled for a true "one-click" unsubscribe.
The generated URLs are hopefully short enough and both shell
and highlighting-friendly to reduce copy+paste errors.
Eric Wong [Thu, 19 May 2016 22:02:56 +0000 (22:02 +0000)]
www: tighten up allowable filenames for attachments
Having a file start with '.' or '-' can be confusing
and for users, so do not allow it.
Eric Wong [Thu, 19 May 2016 21:18:32 +0000 (21:18 +0000)]
view: reduce clutter for attachments w/o description
For attachments without a filename or description, reduce
the amount of precious screen space required to display
a link to it.
Eric Wong [Thu, 19 May 2016 19:23:13 +0000 (19:23 +0000)]
www: validate and check filenames in URLs
We shall ensure links continue working for this.
Eric Wong [Thu, 19 May 2016 10:23:28 +0000 (10:23 +0000)]
msg_iter: workaround broken Email::MIME versions
Email::MIME >= 1.923 and < 1.935 would drop too many newlines
in attachments. This would lead to ugly text files without
a proper trailing newline if using quoted-printable, 7bit, or
8bit. Attachments encoded with base64 were not affected.
These versions of Email::MIME are widely available in Debian 8
(Jessie) and even Ubuntu LTS distros so we will need to support
this workaround for a while.
Eric Wong [Thu, 19 May 2016 02:42:05 +0000 (02:42 +0000)]
www: support downloading attachments
This can be useful for lists where the convention is to
attach (rather than inline) patches into the message body.
Eric Wong [Thu, 19 May 2016 00:31:50 +0000 (00:31 +0000)]
switch read-only uses of walk_parts to msg_iter
msg_iter lets us know the index of the attachment,
allow us to make more sensible labels and in a future
commit, hyperlinks to download attachments.
Eric Wong [Wed, 18 May 2016 20:30:31 +0000 (20:30 +0000)]
msg_iter: new internal API for iterating through MIME
Unlike Email::MIME::walk_parts, this is non-recursive and gives
depth + index offset information about the part for creating
links for later retrieval
It is intended for read-only access and changes are not
propagated to the parent; however future versions of it
may clobber bodies or the original version as it iterates
to reduce memory overhead.
It is intended for making it easy to locate attachments within a
message in the WWW view.
Eric Wong [Tue, 10 May 2016 19:36:54 +0000 (19:36 +0000)]
view: rely on Email::MIME::body_str for decoding
Or is it "encoding"? Gah, Perl character set handling
confuses me no matter how many times I RTFM :<
This contains placeholders for attachment downloading
which will be in a future commit.
Eric Wong [Thu, 19 May 2016 08:06:05 +0000 (08:06 +0000)]
nntpd: avoid uninitialized warning
Oops, but at least it was mostly harmless, just ugly.
Followup-to: 9bfe40e7a4ac 'nntp: use "newsgroup" instead of "name"''
Eric Wong [Wed, 18 May 2016 18:58:04 +0000 (18:58 +0000)]
nntpd: reject control characters entirely
There's no place for them in the commands and we don't take
messages; potentially printing them into a log opened in a
terminal is too dangerous.
Hoist out read_til_dot in the test while we're at it.
Eric Wong [Wed, 18 May 2016 02:48:37 +0000 (02:48 +0000)]
tests: add check-www-inbox script
This can be useful for hammering a live HTTP server
with requests to ensure it does not fall over under
load.
Eric Wong [Wed, 18 May 2016 02:34:46 +0000 (02:34 +0000)]
view: avoid redirect to reply endpoint
Oops, but perhaps the "reply" endpoint should be embedded
into the permalink message view itself to reduce URLs.
Eric Wong [Wed, 18 May 2016 02:27:07 +0000 (02:27 +0000)]
feed: inline feed entry generation
Remove unnecessary wrapper subroutines and constants
which are only used once.
Eric Wong [Tue, 17 May 2016 08:16:47 +0000 (08:16 +0000)]
http: release resources when idle
This lets us release old git processes so unlinked packs
(leftover from repacking) can be released. This may also
be helpful for Xapian as indices get rebuilt for tuning.
For SQLite (msgmap), the there may be no benefit besides
reducing FD pressure.
Followup changes will unify the Inbox and NewsGroup
classes and allow better code-sharing between NNTP and
HTTP classes (as well as the planned POP3 class).
Eric Wong [Tue, 17 May 2016 05:39:06 +0000 (05:39 +0000)]
view: escape Message-ID for "next" link
Oops, we need to escape Message-IDs since they can contain
bad characters such as '%' in them. '@' actually seems fine
and does not need to be escaped; however, but we've been
doing it forever.
Eric Wong [Sun, 15 May 2016 06:31:50 +0000 (06:31 +0000)]
www: fix for running under mount paths
We try to avoid issues like these by using relative URLs
in hrefs, but we can't avoid the problem with Location:
for redirects and Atom feeds which are likely to be
rehosted elsewhere.
We also reorder some of the code to work around a weird
issue on the psgi-plack mailing list:
<
20160516073750.GA11931@dcvr.yhbt.net>
(Somewhere on https://groups.google.com/group/psgi-plack
but it's probably not bookmarkable)
Eric Wong [Sun, 15 May 2016 06:31:49 +0000 (06:31 +0000)]
config: allow taking an existing reference
This should make creating test cases easier and faster.
Eric Wong [Sat, 14 May 2016 06:10:36 +0000 (06:10 +0000)]
declare Inbox object for reusability
From the beginning, we've avoided objects here in favor
of faster startup time; but it may not be worth it
since a persistent httpd/nntpd is faster and -mda
isn't hit as often.
Eric Wong [Mon, 16 May 2016 02:31:04 +0000 (02:31 +0000)]
doc: sync ~/.spamassassin/user_prefs with my prod machine
This is what I'm running on public-inbox.org as of today.
Eric Wong [Sun, 15 May 2016 23:30:06 +0000 (23:30 +0000)]
mbox: support /$INBOX/all.mbox.gz endpoint
Allows easily downloading the entire archive without
special tools. In any case, it's not yet advertised to via
HTML until we can test it better. It'll also support range
queries in the future to avoid wasting bandwidth.
Eric Wong [Sun, 15 May 2016 23:43:20 +0000 (23:43 +0000)]
mbox: consistent header order when decompressed
This should make validating the output easier
when testing between different servers.