Eric Wong [Sat, 9 Jul 2016 00:00:11 +0000 (00:00 +0000)]
nntp: return if a client drops on us
Danga::Socket::write will set the closed flag on a socket,
automatically, and we do not need to bring down an entire
server when one client breaks the connection :P
Eric Wong [Thu, 7 Jul 2016 01:39:37 +0000 (01:39 +0000)]
www: remove old footer generation code and normalize new.html
We now generate all of our HTML using WwwStream which
forces us to have consistent headers and footers in
the HTML itself.
This also makes the search-capable vs search-less installs
go to the new.html endpoint to maintain consistency
(in case an admin decides to enable Xapian).
Eric Wong [Thu, 7 Jul 2016 01:39:36 +0000 (01:39 +0000)]
inbox: cleanup and consolidate object weakening
This fixes some layering violations and consolidates
the cleanup into the inbox object itself. Keeping in
mind weakening does not work at all without our PSGI
server.
Eric Wong [Wed, 6 Jul 2016 02:32:07 +0000 (02:32 +0000)]
www: use HTML <hr> instead of XHTML <hr />
We only need XHTML-compatibility inside Atom feeds, as
anecdotally, feed readers are stricter than normal browsers and
some do not support HTML, only XHTML. So we will continue to
accomodate them. However we favor HTML elsewhere since it
tends to be smaller than the equivalent well-formed XHTML.
Eric Wong [Wed, 6 Jul 2016 01:21:17 +0000 (01:21 +0000)]
extmsg: disable automatic inbox switching
Automatic inbox switching was a potentially deceptive pattern
and surprises readers who do not check the URL bar closely.
Furthermore, a message could be cross-posted to multiple lists,
too.
Eric Wong [Wed, 6 Jul 2016 00:36:59 +0000 (00:36 +0000)]
address: attempt to handle comments somewhat
They're uncommon, fortunately, but we make no attempt to
handle nested comments (which would open us up to things
like CVE-2015-7686) or use the comment in place of a
missing name.
Eric Wong [Tue, 5 Jul 2016 13:05:41 +0000 (13:05 +0000)]
daemon: disable USR2/TTIN/TTOU/WINCH in workers
If using a master/worker setup, a careless user could be trying
to signal all processes using "killall". This may trigger bad
side-effects; but try to limit the side-effects as much as
possible.
Eric Wong [Sat, 2 Jul 2016 22:57:29 +0000 (22:57 +0000)]
wwwstream: wording/grammar tweaks in trailer
git.git documentation uses "clonable" so that's probably
a better term than "clone-able". Also, shorten the section
for retrieving our code and remove an obvious typo.
Eric Wong [Fri, 1 Jul 2016 02:09:45 +0000 (02:09 +0000)]
git: allow cloning from the URL root, too
This means we can still show non-git users a somewhat browseable
URL with a link to the README.html file while allowing git users
to type less when cloning.
Eric Wong [Thu, 30 Jun 2016 08:57:49 +0000 (08:57 +0000)]
Merge branch 'thread-view-skel'
* thread-view-skel:
view: show thread size when linking to summary
view: default to flat/hybrid thread display
view: fix up some HTML injection via Message-ID vectors
www: reinstate old thread view as an option
view: show more nearby messages in flat thread view
view: tweak thread/index header slightly
feed: add $INBOX/new.html endpoint
view: merge $state hash with existing $ctx
view: show thread context in the thread-aware flat view
www: use WwwStream for dumping thread and search views
www: implement hybrid flat+thread conversation view
Eric Wong [Thu, 30 Jun 2016 07:46:18 +0000 (07:46 +0000)]
Revert "view: update git-send-email URL"
This reverts commit a391cf5aaf7181b5e5e20eb240c7ce50cbdf8fa2
as kernel.org is updating again. Ref:
http://mid.gmane.org/xmqqpor18a2n.fsf@gitster.mtv.corp.google.com
Eric Wong [Thu, 30 Jun 2016 02:35:19 +0000 (02:35 +0000)]
view: tweak thread/index header slightly
This makes the top permalink/raw as well as the In-Reply-To
show up without search. While we're at it, try to make
the links on the thread index from the "X siblings, Y replies"
more obvious.
Eric Wong [Thu, 30 Jun 2016 02:35:14 +0000 (02:35 +0000)]
www: use WwwStream for dumping thread and search views
This allows us the HTTP server to react to backpressure
from slow clients when writing. As a side effect, this
also makes it easier for us to maintain a consistent
header/footer across our HTML.
This should be more accessible to readers on narrow terminals
(or giant fonts) while providing a chronological view which
is also aware of message threading relationships.
Eric Wong [Sun, 26 Jun 2016 07:58:43 +0000 (07:58 +0000)]
spamcheck/spamc: fix compatibility with Perl 5.14.2
This is necessary for Debian 7.x (wheezy), since
GLOB objects do not seem responsive to the can("fileno")
check (we do a similar check in GitHTTPBackend).
Eric Wong [Sat, 25 Jun 2016 21:29:43 +0000 (21:29 +0000)]
view: safer and optional quoting for --in-reply-to arg
Angle brackets around the --in-reply-to= arg for git send-email
has been optional since git v1.5.3.2, so strip them and make the
command-line argument easier-to-type.
Eric Wong [Sat, 25 Jun 2016 07:19:10 +0000 (07:19 +0000)]
address: beef up the module with name list extaction
We may remove from_name in the future.
...And disallow quotes in email addresses.
Technically I believe they're allowed, but they're definitely
uncommon and unlikely to show up in legitimate mail.
Eric Wong [Fri, 24 Jun 2016 23:40:03 +0000 (23:40 +0000)]
http: cork chunked responses for small savings
This only affects Linux users with MSG_MORE support.
We can avoid extra TCP overhead for sub-optimal chunk sizes
by using MSG_MORE even with chunk trailers under Linux.
This breaks real-time apps which require <= 200ms latency for
streaming small packets (e.g. implementing "tail -F"), but the
public-inbox WWW code does not (and will never) do such things.
Eric Wong [Fri, 24 Jun 2016 20:37:52 +0000 (20:37 +0000)]
watch_maildir: ignore Trash and Drafts, support Dovecot
Trashed messages and drafts are probably not intended for
importing, so do not import them. Dovecot uses extra flags via
lowercase letters, so we must support those (as that's the
server I use).