Date | Commit message (Collapse) |
|
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.
|
|
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.
|
|
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.
|
|
Oops, but at least it was mostly harmless, just ugly.
Followup-to: 9bfe40e7a4ac 'nntp: use "newsgroup" instead of "name"''
|
|
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.
|
|
This can be useful for hammering a live HTTP server
with requests to ensure it does not fall over under
load.
|
|
Oops, but perhaps the "reply" endpoint should be embedded
into the permalink message view itself to reduce URLs.
|
|
Remove unnecessary wrapper subroutines and constants
which are only used once.
|
|
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).
|
|
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.
|
|
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)
|
|
This should make creating test cases easier and faster.
|
|
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.
|
|
This is what I'm running on public-inbox.org as of today.
|
|
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.
|
|
This should make validating the output easier
when testing between different servers.
|
|
Mostly stolen from git upstream, these should prevent any caches
such as varnish or squid from acting improperly.
|
|
A public-inbox is NOT necessarily a mailing list, but it
could serve as an input point for zero, one, or infinite
mailing lists :D
|
|
This reduces the cognitive overhead for mapping names of
configuration values to internal field names of our classes.
Further changes along these lines coming...
|
|
Unfortunately, most users still prefer their mail delivered
over SMTP; so we'll at least document mlmmj integration for now
until we can popularize pull-based reading over POP3/NNTP/ssoma.
|
|
We'll need to test non-UTF-8 messages at some point, too.
There are lots of legacy-encoded messages in old archives
and I would not bet we behave sanely w.r.t. those.
|
|
The Xapian search index is required for the NNTP server, so
there's no point in calling system() for it like we do in
other tests. This should speed up the test a small amount.
|
|
This should help poor developers who still use rotating disks on
cheap netbooks.
|
|
We need Perl to believe everything we send is UTF-8,
make it so, even if it may not be.
Fixes: 265e79ff82ce 'Revert "nntp: proper UTF-8 support (hopefully?)"'
|
|
This reverts commit f81ad477cb013d05b9b11fa051a9ebc5983a5be6.
The raw, undecoded body is probably what should be sent over the
wire anyways for clients to deal with. We'll need this to avoid
deprecation warnings with Perl 5.24+ since we use
send()/recv()/sysread().
|
|
We can maintain the client HTTP connection if the process exited
with failure as long as we terminated our own response properly.
|
|
git doesn't handle '<' and '>' characters in the author
name at all regardless of quoting, not just matched pairs.
So fall back to using the email as the author name since
the commit info isn't critical, anyways (shallow clones
are fine).
|
|
Mbox formatters may add extra newlines at the end of the
message, and that's not relevant for comparing messages
for deletion.
|
|
This allows messages to be read in chronological order when
read without a mail client (e.g. with "zcat t.mbox.gz | less")
|
|
Ugh, I really need to get off my ass to write automated tests for
an Apache2 + mod_perl config.
|
|
When serving large static files or large packs, we may call
Danga::Socket::write directly to queue up callbacks to resume
reading and defer firing them until the socket is writable.
This prevents us from scheduling writes or buffering until we
know the socket is writable and prevents needless buffering by
Danga::Socket when faced with slow clients.
For smart clones, this comes at the cost of throttling the
output of "git pack-objects" to the speed of the client
connection. This is probably not ideal, but is the behavior of
the standard git-daemon, too; and is preferable to running the
httpd out-of-memory. Buffering to the filesystem may be an
option in the future...
|
|
This empty string check is for middlewares such as Deflater
which may write empty strings, not for direct real callers of
Danga::Socket who (presumably) know what they're doing.
|
|
We only need to use env(1) under mod_perl; since mod_perl
is uncommon nowadays, support native %ENV for a teeny
speedup for folks uncomfortable with running vfork via
Inline::C snippet.
|
|
Process startup times are atrocious for fast tests and there's far
too much setup involved. Rely on git-fast-import instead; but
more work is needed in this area.
|
|
It limits flexibility and makes it harder to switch
to use PublicImport::Import.
|
|
For readers using NNTP, we should do our best to advertise the
clonable HTTP/HTTPS URLs and the message permalink URL for
ease-of-referencing messages, since we don't want the NNTP server
and it's sequential article numbers to be relied on.
|
|
Broken threads should be exposed to hopefully encourage people to
use proper mail clients which set In-Reply-To headers.
|
|
Unnecessary on *nix, and we won't support systems
which do insane things.
|
|
We cannot afford to fire Perl-level signal handlers in the
vforked child process since they're not designed to run in
the child like that.
Thus we need to block all signals before calling vfork, reset
signal dispositions in the child, and restore the signal mask in
the parent.
ref: https://ewontfix.com/7
|
|
Since we use sysread, we must use sysseek for symmetry although
PerlIO may be doing a real lseek with "seek", anyways.
Fixes: 310819ea86ac ("git-http-backend: favor sysread for regular files")
|
|
We can reduce the allocation and overhead needed for
Danga::Socket timers for immediately-executed responses by
combining identical timers and reducing anonymous sub creation.
|
|
This should allow users to change and add headers as needed.
While we're at it, add the X-Original-To header Postfix likes
to add; it seems like pointless bloat with the existence of
(important) Received: headers.
|
|
Adding ':' (colon), ',' (comma), '$' (dollar sign) and
supporting TLS-enabled schemes: ftps, nntps variants as
well as gopher :D
|
|
Tilde is common for some homepages: http://example.org/~user/
There's probably some other acceptable characters I'm missing.
|
|
git clones may take longer than 30s, much longer... So prepare
to wait almost indefinitely for sockets to timeout and document
the second signal behavior for immediate shutdown.
While we're at it, move parent death handling to a separate
class to avoid Danga::Socket->AddOtherFds, since that does not
allow proper handling the parent pipe being closed and would
actually misterminate a worker prematurely. t/nntpd.t is update
to illustrate the failure with workers enabled.
We will work to keep memory usage low and let clients take their
time without interrupting them.
|
|
git clones may take a long time and it's wrong to
drop connections in the middle of a transaction.
|
|
Noticed when using a long URL in the subject.
|
|
This saves us a system call for common GET/HEAD requests
with no upload body.
|
|
Email addresses get out-of-date, so make sure they're mapped
properly for future readers. git and linux-kernel already have
an established convention for this, so we will follow it.
|
|
We need to abort connections properly if a response is prematurely
truncated. This includes problems with serving static files, since
a clumsy admin or broken FS could return truncated responses and
inadvertently leave a client waiting (since the client saw
"Content-Length" in the header and expected a certain length).
|