Eric Wong [Sun, 1 May 2016 01:54:07 +0000 (01:54 +0000)]
linkify: match more URL characters [:,\$] and schemes
Adding ':' (colon), ',' (comma), '$' (dollar sign) and
supporting TLS-enabled schemes: ftps, nntps variants as
well as gopher :D
Eric Wong [Sun, 1 May 2016 01:47:10 +0000 (01:47 +0000)]
linkify: match '~' (tilde) in URLs
Tilde is common for some homepages: http://example.org/~user/
There's probably some other acceptable characters I'm missing.
Eric Wong [Sat, 30 Apr 2016 02:57:40 +0000 (02:57 +0000)]
daemon: graceful shutdown warning and limit removal
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.
Eric Wong [Sat, 30 Apr 2016 02:57:39 +0000 (02:57 +0000)]
http: graceful shutdown for pi-httpd.async callers
git clones may take a long time and it's wrong to
drop connections in the middle of a transaction.
Eric Wong [Sat, 30 Apr 2016 02:02:53 +0000 (02:02 +0000)]
searchmsg: ensure long subject lines are not broken
Noticed when using a long URL in the subject.
Eric Wong [Fri, 29 Apr 2016 20:21:39 +0000 (20:21 +0000)]
http: avoid lseek if no input
This saves us a system call for common GET/HEAD requests
with no upload body.
Eric Wong [Fri, 29 Apr 2016 20:06:14 +0000 (20:06 +0000)]
TODO: add item for .mailmap support
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.
Eric Wong [Fri, 29 Apr 2016 03:32:20 +0000 (03:32 +0000)]
http: improve error handling for aborted responses
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).
Eric Wong [Mon, 7 Mar 2016 19:10:33 +0000 (19:10 +0000)]
git-http-backend: check EINTR as well as EAGAIN
The blocking PSGI server may cause EINTR to be hit, here.
Eric Wong [Fri, 29 Apr 2016 04:00:24 +0000 (04:00 +0000)]
http: avoid corking on "Content-Length: 0" response
We must use a normal write instead of send(.., MSG_MORE)
when writing responses of "Content-Length: 0" to avoid
the corking effect MSG_MORE provides. We only want to
cork headers if we will send a non-empty body.
Fixes: c3eeaf664cf0 ("http: clarify intent for persistence")
This needs a proper test.
Eric Wong [Thu, 28 Apr 2016 01:56:08 +0000 (01:56 +0000)]
githttpbackend: clamp to one smart HTTP request at-a-time
Server admins may not be able to afford to have too many
git-pack-objects processes running at once. Since PSGI
HTTP servers should already be configured to use multiple
processes for other requests; limit concurrency of smart
backends to one; and fall back to dumb responses if we're
already generating a pack.
Eric Wong [Thu, 28 Apr 2016 01:56:07 +0000 (01:56 +0000)]
githttpbackend: fall back to dumb if smart HTTP is off
Using http.getanyfile still keeps the http-backend process
alive, so it's better to break out of that process and
handle serving entirely within the HTTP server.
Eric Wong [Thu, 28 Apr 2016 01:03:31 +0000 (01:03 +0000)]
import: run git-update-server-info when done
We should update $GIT_DIR/info/refs for dumb HTTP clients
whenever we make changes to the repository. The best place
to update is immediately after making commits.
This fixes a bug where public-inbox-learn did not properly
update $GIT_DIR/info/refs after inserting or removing
messages.
Eric Wong [Wed, 27 Apr 2016 23:14:38 +0000 (23:14 +0000)]
import: document API for public consumption
This is probably trivial enough to be final?
Eric Wong [Mon, 25 Apr 2016 11:52:44 +0000 (11:52 +0000)]
t/feed.t: run properly without ssoma installed
While we're at it, update some references to ssoma in the
Makefile.PL comment.
Eric Wong [Mon, 25 Apr 2016 10:23:45 +0000 (10:23 +0000)]
TODO: various updates
Eric Wong [Mon, 25 Apr 2016 10:11:10 +0000 (10:11 +0000)]
githttpbackend: require IO::File explicitly
This is used all over the place, but may not be in the future,
so ensure we explicitly load it ourselves.
Eric Wong [Mon, 25 Apr 2016 09:50:02 +0000 (09:50 +0000)]
remove GIT_DIR env usage in favor of --git-dir
No need to maintain per-block environment state when we can
localize it to per-command. We've had --git-dir= in git
since 1.4.2 (2006-08-12) and already use it all over the
place.
Eric Wong [Mon, 25 Apr 2016 09:50:01 +0000 (09:50 +0000)]
remove ssoma dependency
By converting to using ourt git-fast-import-based Import
module. This should allow us to be more easily installed.
Eric Wong [Mon, 25 Apr 2016 09:50:00 +0000 (09:50 +0000)]
import: extra check for final byte read
The read could fail entirely and leave $lf undefined.
Eric Wong [Mon, 25 Apr 2016 07:51:26 +0000 (07:51 +0000)]
nntp: reduce timers for weakening
Danga::Socket timers are not cheap, so avoid creating up
to 3 timers per-newsgroup by batching resource weakening.
This lets us reduce resource consumption for scheduing
additional resource consumption reduction :)
Eric Wong [Mon, 25 Apr 2016 06:42:48 +0000 (06:42 +0000)]
nntp: remove unused hdr_val subroutine
hdr_val has not been used since commit
1d236e649df1
("nntp: implement OVER/XOVER summary in search document")
Eric Wong [Mon, 25 Apr 2016 05:12:43 +0000 (05:12 +0000)]
split out NNTPD and HTTPD* modules
Hopefully this modularizes things a little and allows us
to work on a combined super server to save RAM.
Eric Wong [Mon, 25 Apr 2016 05:07:26 +0000 (05:07 +0000)]
mda: don't clobber existing List-Id header
We may be importing mail from other lists, so do not
clobber the existing List-Id header.
Eric Wong [Mon, 25 Apr 2016 01:10:41 +0000 (01:10 +0000)]
searchview: add "rel=next" and "rel=prev" here, too
ref: https://www.w3.org/TR/html/links.html#sequential-link-types
Followup-to: c4183f56aab6 ("www: add rel=next and rel=prev navigation hints")
Eric Wong [Mon, 25 Apr 2016 01:00:24 +0000 (01:00 +0000)]
www: add rel=next and rel=prev navigation hints
This can makes navigation easier with some browsers or
or browser extensions.
ref: https://www.w3.org/TR/html/links.html#sequential-link-types
Eric Wong [Mon, 25 Apr 2016 00:07:40 +0000 (00:07 +0000)]
view: fix link generation for replies in threads
Oops, gotta test this :x
Eric Wong [Sun, 24 Apr 2016 23:52:00 +0000 (23:52 +0000)]
view: add extra newline in flat thread view for lynx
This shouldn't show up in other browsers (tested with w3m, too),
but the extra newline makes a difference for delineating
messages when viewed with lynx.
Eric Wong [Sun, 24 Apr 2016 23:37:54 +0000 (23:37 +0000)]
view: more consistent prefixing for thread skeletons
This will allow potential tinkerers to switch away from the '` '
prefix more easily.
Eric Wong [Thu, 21 Apr 2016 22:46:04 +0000 (22:46 +0000)]
mda: reject multiple Message-IDs up front
While ssoma now documents it uses the first Message-ID, they
are confusing and could be a sign of a broken mail software,
and broken mail software is often a sign of spam...
ref: http://public-inbox.org/meta/
20160421221128.4910-1-e@80x24.org/
Eric Wong [Sat, 16 Apr 2016 18:46:35 +0000 (18:46 +0000)]
view: show flat thread view in chronological order
Allowing readers new to a topic to follow in chronological order
probably makes the most sense. Reverse chronological order may
reduce scrolling (e.g. log view); but nearly all non-threaded
conversation displays seem to be chronological so perhaps
there's a good reason for that.
Eric Wong [Fri, 15 Apr 2016 21:40:13 +0000 (21:40 +0000)]
view: thread skeleton tweaks
Allow the Subject: <-> skeleton line to point to each other so
the reader can bounce around between them without refocusing
their browser.
Eric Wong [Fri, 15 Apr 2016 20:50:56 +0000 (20:50 +0000)]
www: redirect /$MESSAGE_ID/f/ endpoints
Quote-folding was a major design mistake pre-1.0. Since this
project is still in its infancy and unlikely to be in wide
use at the moment, redirect the /f/ endpoints back to the
plain message.
Eric Wong [Thu, 14 Apr 2016 22:57:48 +0000 (22:57 +0000)]
doc: update design notes on WWW development
Start documenting our anchors and CSS classes for in case users
want to write their own CSS or even JavaScript for local usage.
Eric Wong [Wed, 13 Apr 2016 22:20:43 +0000 (22:20 +0000)]
view: drop vestigial elements of quote folding
...And mark quotes as <span class="q"> since it barely
costs us anything and allows users to choose colors
themselves with custom, user-supplied CSS.
Reduce allocations of the Linkify object, too.
Eric Wong [Wed, 13 Apr 2016 03:04:11 +0000 (03:04 +0000)]
www: stop generating /$MESSAGE_ID/f/ links
Quote-folding can be detrimental as it fails to hide the
real problem of over-quoting.
Over-quoting wastes bandwidth and space for all readers, not
just WWW readers of the public-inbox. So hopefully removing
quote-folding support from the WWW interface can shame those
repliers into quoting only relevant portions of what they reply
to.
Eric Wong [Wed, 13 Apr 2016 02:42:32 +0000 (02:42 +0000)]
view: fix link to view replies from $MESSAGE_ID/f/ links
Oops, $MESSAGE_ID/f/R/ screws up rather badly.
Eric Wong [Wed, 13 Apr 2016 01:35:56 +0000 (01:35 +0000)]
searchview: deal with the removal of rsort
Oops. While we're at it, simplify the calls to do threading
slightly by reducing the places where we touch Mail::Thread
globals.
Fixes: 56164afc2034 (view: allow topics to be "bumped" by new replies)
Eric Wong [Tue, 12 Apr 2016 21:25:05 +0000 (21:25 +0000)]
mbox: do not clobber existing archive headers in WWW
When serving archives, it's more robust to keep existing
archive links in one server goes down.
Eric Wong [Tue, 12 Apr 2016 21:18:55 +0000 (21:18 +0000)]
view: allow topics to be "bumped" by new replies
This ought to prevent new replies from getting lost for readers
relying on the WWW index interface.
Eric Wong [Tue, 12 Apr 2016 21:16:38 +0000 (21:16 +0000)]
import: filter out [<>] from user names
It confuses the git ident parser and may not be a great
idea to fix in git since it could break interopability
with older versions.
Eric Wong [Mon, 11 Apr 2016 04:44:53 +0000 (04:44 +0000)]
import: use bytes::length for true data length in bytes
git is byte-oriented and fast-import will not tolerate
miscalculations. This is necessary for wide characters
in commit messages (email Subjects).
Eric Wong [Sat, 9 Apr 2016 09:07:16 +0000 (09:07 +0000)]
import: set binmode before printing author names
Author names may have wide characters in them, so avoid warnings
as git favors UTF-8 for names and fast-import even requires them
for commit messages
Eric Wong [Sat, 9 Apr 2016 00:28:07 +0000 (00:28 +0000)]
import: initial module + test case
This will allow us to write fast importers for existing
archives as well as eventually removing the ssoma dependency
for performance and ease-of-installation.
Eric Wong [Thu, 31 Dec 2015 21:16:39 +0000 (21:16 +0000)]
git: add support for qx wrapper
This lets us one-line git commands easily like ``, but without
having to remember --git-dir or escape arguments.
Eric Wong [Mon, 11 Apr 2016 04:51:40 +0000 (04:51 +0000)]
mbox: unconditionally add trailing newline
This may be necessary for compatibility with non-mboxrd aware
parsers which expect "\nFrom " for everything but the first
record.
Eric Wong [Sat, 9 Apr 2016 01:27:37 +0000 (01:27 +0000)]
public-inbox-learn: drop leading "From " line from mboxes
It can confuse Email::MIME if we have it.
Eric Wong [Sat, 9 Apr 2016 01:21:59 +0000 (01:21 +0000)]
filter: remove out dated comments
Followup-to commit
5a590bcb6813
("filter: preserve Mail-Followup-To and Mail-Reply-To")
Eric Wong [Sat, 9 Apr 2016 00:57:26 +0000 (00:57 +0000)]
filter: preserve Mail-Followup-To and Mail-Reply-To
Allow users to do wacky things here if they really wish...
It's bad practice, but at least allow other readers to
mock users of these headers :P
Eric Wong [Wed, 6 Apr 2016 08:23:15 +0000 (08:23 +0000)]
view: account for threads lacking a common parent
In the per-message view, we still need to account for threads
lacking a common parent. This can happen when threads are
broken by some broken clients or if somebody sends the same
message twice to the same inbox with a different Message-ID.
Eric Wong [Wed, 6 Apr 2016 07:37:46 +0000 (07:37 +0000)]
view: shorter link for ghosts in per-message view
Shorten lines used for long Message-IDs in the
inline thread view for per-message views for readability.
Eric Wong [Wed, 6 Apr 2016 07:21:12 +0000 (07:21 +0000)]
view: do not prune ghosts from threads
Keeping readers informed of ghost messages is important,
so do not ever prune them. Previously, ghosts could get
pruned and sole children would get promoted as the new
root.
Eric Wong [Wed, 6 Apr 2016 06:55:39 +0000 (06:55 +0000)]
view: eliminate dead code and hash fields
These were the vestigial remains of our previous use of
of Message-ID compression.
Eric Wong [Wed, 6 Apr 2016 06:30:28 +0000 (06:30 +0000)]
examples/public-inbox.psgi: add note for our httpd
Default to maximizing compatibility in the example, but document the
potential improvement if possible. Of course, using
public-inbox-httpd out-of-the-box without a user-specified config
file already enables chunked encoding by default.
Eric Wong [Wed, 6 Apr 2016 05:38:53 +0000 (05:38 +0000)]
http: clarify intent for persistence
We don't actually need to know if a response is chunked or
what the actual Content-Length is; we just need to know if
the PSGI app properly terminated the response so we can
handle persistent connections.
Eric Wong [Tue, 5 Apr 2016 06:26:35 +0000 (06:26 +0000)]
view: link restructuring for index view
The "next/prev" links seem a bit awkward and I don't use them as
much as I expected to. However, move the "raw" message link
near the top since it's most useful for checking or reinforcing
the validity of the message via GPG or just reading headers.
Turn the Subject line into a permalink to the message, since
that's probably the common behavior anyways for other messaging
systems. Make the "[threaded|flat]" view links to always
visible for bookmark-ability despite the lack of a "permalink"
label.
Eric Wong [Mon, 4 Apr 2016 21:15:26 +0000 (21:15 +0000)]
http: fix condition for detecting persistence
Oops, we need to watch out for how we handle operator
precedence and ensure responses without a Content-Length
or "Transfer-Encoding: chunked" header will always
disconnect after writing.
Eric Wong [Sat, 2 Apr 2016 22:32:13 +0000 (22:32 +0000)]
www: more explicit "git clone" usage
Little harm in having the entire command-line for users and
avoiding the cognitive overhead of figuring out $URL.
Eric Wong [Sat, 2 Apr 2016 22:32:01 +0000 (22:32 +0000)]
www: various style changes and comment updates
Reduce stack depth of arguments and rely more on state hashref
to store response state. We may end up shoving everything
in ctx eventually.
Eric Wong [Thu, 31 Mar 2016 03:33:59 +0000 (03:33 +0000)]
httpd: remove reference to callback during close
Avoid wasting memory and the risk of a potential reference
cycles by dropping the callback ASAP.
Eric Wong [Thu, 17 Mar 2016 01:50:07 +0000 (01:50 +0000)]
daemon: expand @ARGV paths for running in '/'
We also require --stdout/--stderr/--pid-file to be absolute
paths for USR2 usage. However, allow PSGI files for -httpd
to be relative paths for ease-of-use.
Eric Wong [Sat, 12 Mar 2016 07:34:20 +0000 (07:34 +0000)]
feed: fix brain farts in new_oneline removal
Ugh...
Fixes: 476fc666c223 (reduce "PublicInbox::Hval->new_oneline" use)
Eric Wong [Sat, 12 Mar 2016 06:51:22 +0000 (06:51 +0000)]
searchmsg: preserve hard tabs, but drop CR (\r)
Hard tabs *may* be searchable, so preserve them since they do
not take up any more space than a normal space. However, CR
(carriage return) is worthless and likely a sign of a buggy mail
(or spam) client anyways.
Eric Wong [Sat, 12 Mar 2016 06:42:04 +0000 (06:42 +0000)]
reduce "PublicInbox::Hval->new_oneline" use
It's probably a bad idea to strip extraneous whitespace
from some headers as an extra space may convey useful
information.
Newlines don't seem to be preserved by Email::MIME or
Email::Simple anyways, so there's no danger in breaking
formatting.
Eric Wong [Sat, 12 Mar 2016 03:55:20 +0000 (03:55 +0000)]
http: use Plack::HTTPParser for HTTP parsing
This allows us to reduce installation dependencies while
retaining performance as it favors HTTP::Parser::XS when
it is installed and available.
PLACK_HTTP_PARSER_PP may be set to 1 to force a pure Perl
parser for testing.
Eric Wong [Sat, 12 Mar 2016 03:14:26 +0000 (03:14 +0000)]
examples: disable Chunked response in PSGI example
It seems incompatible with Starman and probably confuses other
HTTP/1.0-only servers, too. Our -httpd will respect it and
requires it for persistent connections.
Eric Wong [Sat, 12 Mar 2016 00:20:12 +0000 (00:20 +0000)]
http: prevent zero-byte writes
Plack::Middleware::Deflater (and perhaps other middleware)
triggers zero-byte writes which wastes syscalls when
they get passed to Danga::Socket. This may also trigger
problems when we introduce TLS support in the future.
Eric Wong [Fri, 11 Mar 2016 21:59:42 +0000 (21:59 +0000)]
daemon: fixup usage of the '-l' switch with IP/INET6 sockets
We need to ensure $sock_pkg is preserved outside of the loop.
The variable passed to "for" or "foreach" is implicitly local
and restores the previous value when the loop exits. This is
documented in the perlsyn manpage in the "Foreach Loops"
section.
Fixes: ea1b6cbd422b ("daemon: allow using IO::Socket::IP over INET6")
Eric Wong [Mon, 7 Mar 2016 17:43:19 +0000 (17:43 +0000)]
daemon: allow using IO::Socket::IP over INET6
IO::Socket::IP is bundled with newer versions of Perl,
so it is more likely to be available. There should
be no differences between these with our use cases.
Eric Wong [Sun, 6 Mar 2016 02:09:22 +0000 (02:09 +0000)]
http: reject excessively large HTTP request bodies
We cannot risk using all of a users' disk space buffering
gigantic requests. Use the defaults git gives us since
we primarily host git repositories.
Eric Wong [Sun, 6 Mar 2016 02:09:21 +0000 (02:09 +0000)]
http: ensure errors are printable before PSGI env
We cannot rely on a client socket having a PSGI env before headers
are fully-parsed as we seek to avoid storing hashes for idle
clients. Sso print errors to the psgi.errors value which belongs to
the httpd listener, instead.
Eric Wong [Sun, 6 Mar 2016 02:09:20 +0000 (02:09 +0000)]
http: reject excessive headers
HTTP::Parser::XS::PP does not reject excessively large
headers like the XS version. Ensure we reject headers
over 16K since public-inbox should never need such large
request headers.
Eric Wong [Sat, 5 Mar 2016 22:42:16 +0000 (22:42 +0000)]
daemon: sockname detects listeners correctly
This means we can avoid false-positives when inheriting multiple
Unix domain sockets.
Eric Wong [Sat, 5 Mar 2016 22:42:12 +0000 (22:42 +0000)]
daemon: document optional Net::Server dependency
Non-socket activation users will want to install Net::Server
for daemonization, pid file writing, and user/group switching.
Eric Wong [Sat, 5 Mar 2016 22:07:53 +0000 (22:07 +0000)]
doc: add contact/see-also/copyright sections to mda manpage
We need manpages before we can expect people to install this.
Eric Wong [Sat, 5 Mar 2016 20:53:25 +0000 (20:53 +0000)]
httpd: remove unnecessary eval
We have per-middleware evals to deal with them being missing;
no need to put an eval around the whole thing and use an
extra level of indentation.
Eric Wong [Sat, 5 Mar 2016 07:35:22 +0000 (07:35 +0000)]
t/httpd-corner: avoid clobbering existing FDs after fork
Due to the deterministic way reference counting works,
we do not want to drop references to existing FDs
even if we no longer need the glob reference; the actual
FD is all we can pass through on exec.
Eric Wong [Sat, 5 Mar 2016 07:08:12 +0000 (07:08 +0000)]
doc: language-neutral client-side endpoints
Be less specific, client-side code can be written in any
language (and I do not care for JS runtimes implemented in
C++ :P).
Eric Wong [Sat, 5 Mar 2016 07:00:41 +0000 (07:00 +0000)]
doc: varyus speling fickses
Letz trie 2 uphear liter8
Eric Wong [Sat, 5 Mar 2016 06:45:41 +0000 (06:45 +0000)]
feed: remove unnecessary encoding lookup
We handle encoding-related things elsewhere.
Eric Wong [Sat, 5 Mar 2016 06:00:59 +0000 (06:00 +0000)]
daemon: simplify parent death handling
No need to create a new sub which kill ourselves $$ when we can
invoke worker_quit directly.
Eric Wong [Sat, 5 Mar 2016 05:52:14 +0000 (05:52 +0000)]
daemon: avoid cyclic references for once-used callbacks
Not that these subs are repeatedly created, but this makes
the code easier-to-review and these callbacks are idempotent
anyways.
Eric Wong [Sat, 5 Mar 2016 05:44:16 +0000 (05:44 +0000)]
daemon: drop listener sockets ASAP on termination
We do not want to be accepting connections during graceful
shutdown because another new process is likely taking over.
This also allows us to free up the listener case another
(independent) process wants to claim it.
Eric Wong [Sat, 5 Mar 2016 05:41:12 +0000 (05:41 +0000)]
t/httpd-corner: additional callback test
Just to ensure we hit the code path independently of
WWW code.
Eric Wong [Sat, 5 Mar 2016 00:24:16 +0000 (00:24 +0000)]
git-http-backend: favor sysread for regular files
We do not need line buffering, here; so favor sysread to
bypass extra copies which may be done by normal read.
Eric Wong [Fri, 4 Mar 2016 01:00:26 +0000 (01:00 +0000)]
daemon: simplify socket inheriting, slightly
IO::Handle->new_from_fd has existed since at least 1996,
so it should be safe to depend on at this point.
Eric Wong [Thu, 3 Mar 2016 10:33:02 +0000 (10:33 +0000)]
daemon: support listening on Unix domain sockets
Listening on Unix domain sockets can be convenient for running
behind reverse proxies, avoiding port conflicts, limiting access,
or avoiding the overhead (if any) of TCP over loopback.
Eric Wong [Thu, 3 Mar 2016 05:14:31 +0000 (05:14 +0000)]
daemon: introduce host_with_port for identifying sockets
This allows us to share more code between daemons and avoids
having to make additional syscalls for preparing REMOTE_HOST
and REMOTE_PORT in the PSGI env in -httpd.
This will also make supporting HTTP (and NNTP) over Unix sockets
easier in a future commit.
Eric Wong [Thu, 3 Mar 2016 05:14:30 +0000 (05:14 +0000)]
daemon: avoid polluting the main package
We've distilled the daemon code into one public function ("run"),
so avoid polluting the main namespace and just have users
prefix with the full package name for this rarely-used class.
Eric Wong [Thu, 3 Mar 2016 09:07:40 +0000 (09:07 +0000)]
t/*.t: use identifiable tempdir names
This should make identifiying leftover directories
due to SIGKILL-ed tests easier.
Eric Wong [Thu, 3 Mar 2016 07:35:34 +0000 (07:35 +0000)]
view: fix stupid typo in inline_dump
Ugh, this enabled-iff-xapian-is-available code really
needs better testing...
Eric Wong [Thu, 3 Mar 2016 03:16:58 +0000 (03:16 +0000)]
use raw header for Message-ID
Message-IDs should not be MIME encoded, but in case they are,
use the raw form for compatibility with ssoma and possibly
other tools. This prevents a potential problem where a
malicious client could confuse our storage layer into indexing
incorrect contents.
Eric Wong [Tue, 1 Mar 2016 08:19:12 +0000 (08:19 +0000)]
http: better error handling for EMFILE/ENFILE
Better to throw the error back to the client ASAP if we're
out-of-descriptors. We will need to implement idle client
expiration for long-lived HTTP connections.
Eric Wong [Tue, 1 Mar 2016 07:52:49 +0000 (07:52 +0000)]
httpd: remove unneeded err and out fields from class
Vestigial pieces from the nntpd code which aren't needed because
the psgi env already has the "psgi.errors" key.
Eric Wong [Tue, 1 Mar 2016 07:48:53 +0000 (07:48 +0000)]
httpd: document pi-httpd.async as totally unstable
We'll have to use it some more before deciding it is a public
interface. I do hope for it to be a usable public interface
one day for other users.
Eric Wong [Tue, 1 Mar 2016 04:15:59 +0000 (04:15 +0000)]
processpipe: preserve native close behavior
We need to ensure close on handles tied to this class
get the same errors a normal "close" in Perl gets.
Eric Wong [Tue, 1 Mar 2016 03:44:04 +0000 (03:44 +0000)]
linkify: do not capture trailing '.' or ';' in URLs
It seems common for users to end statements with URLs,
while it is rare for a URL itself to end with a '.' or ';'.
So make a guess and assume the URL was intended to not
include the trailing '.' or ';'
Eric Wong [Tue, 1 Mar 2016 03:44:03 +0000 (03:44 +0000)]
extract linkification code to a separate package
This will allow us to more easily reuse it elsewhere.
Eric Wong [Tue, 1 Mar 2016 03:44:02 +0000 (03:44 +0000)]
MANIFEST: add examples/apache2_perl_old.conf
Ugh, I wonder if we can/should generate this automatically...
Eric Wong [Tue, 1 Mar 2016 02:45:34 +0000 (02:45 +0000)]
view: consolidate whitespace stripping from messages
We now keep intermediate blank lines in messages, since it
could be used to denote logical gaps in the message
(such as giving readers a chance to opt out of "spoiler"
information).
However leading blank lines, trailing blank lines, and
trailing whitespace have no useful value we can discern;
so drop those entirely to prevent clients from eating up
vertical whitespace.