]> Sergey Matveev's repositories - public-inbox.git/log
public-inbox.git
8 years agoextmsg: favor user-provided URL on partial matches
Eric Wong [Sun, 17 Jul 2016 23:27:02 +0000 (23:27 +0000)]
extmsg: favor user-provided URL on partial matches

While an inbox may have multiple URLs, we will favor
the existing URL for the current inbox on partial matches
to avoid confusing users or slowing them down by requiring
a new TCP connection.

8 years agoview: conditionally anchor to thread skeleton
Eric Wong [Sun, 10 Jul 2016 01:24:08 +0000 (01:24 +0000)]
view: conditionally anchor to thread skeleton

We only care about the thread skeleton if we have
multiple messages in a thread, single message threads
can just go to the top of the message.

8 years agoINSTALL: postfix and spamassassin are optional for HTTP mirrors
Eric Wong [Sun, 10 Jul 2016 00:47:14 +0000 (00:47 +0000)]
INSTALL: postfix and spamassassin are optional for HTTP mirrors

Not everybody needs to run an -mda or -watch

8 years agoview: add "infourl" for reply information
Eric Wong [Sat, 9 Jul 2016 23:55:44 +0000 (23:55 +0000)]
view: add "infourl" for reply information

8 years agoview: show most recently updated topics, first
Eric Wong [Sat, 9 Jul 2016 08:01:17 +0000 (08:01 +0000)]
view: show most recently updated topics, first

This probably makes the most sense as it's structured like
a changelog.

8 years agoview: improve grouping for topic view
Eric Wong [Sat, 9 Jul 2016 07:53:17 +0000 (07:53 +0000)]
view: improve grouping for topic view

This reduces the amount of mbox/Atom links while keeping
better track of overall thread count.  We no longer loop
to fill up slots to simplify the code a bit and hopefully
get better grouping.

8 years agohttpd/async: reinstate D::S timer usage for cleanup
Eric Wong [Sat, 9 Jul 2016 04:51:37 +0000 (04:51 +0000)]
httpd/async: reinstate D::S timer usage for cleanup

EvCleanup::asap events are not guaranteed to run after
Danga::Socket closes sockets at the event loop.  Thus we
must use slower Danga::Socket timers which are guaranteed
to run at the end of the event loop.

8 years agohttpd/async: do not attempt future writes on closed sockets
Eric Wong [Sat, 9 Jul 2016 04:51:36 +0000 (04:51 +0000)]
httpd/async: do not attempt future writes on closed sockets

Danga::Socket::close does not clear the write_buf_size field,
so it's conceivable we could attempt to queue up data and
callbacks we can never flush out.

8 years agowww: add configurable limiters
Eric Wong [Sat, 9 Jul 2016 03:18:35 +0000 (03:18 +0000)]
www: add configurable limiters

Currently only for git-http-backend use, this allows limiting
the number of spawned processes per-inbox or by group, if there
are multiple large inboxes amidst a sea of small ones.

For example, a "big" repo limiter could be used for big inboxes:
which would be shared between multiple repos:

[limiter "big"]
max = 4
[publicinbox "git"]
address = git@vger.kernel.org
mainrepo = /path/to/git.git
; shared limiter with giant:
httpbackendmax = big
[publicinbox "giant"]
address = giant@project.org
mainrepo = /path/to/giant.git
; shared limiter with git:
httpbackendmax = big

; This is a tiny inbox, use the default limiter with 32 slots:
[publicinbox "meta"]
address = meta@public-inbox.org
mainrepo = /path/to/meta.git

8 years agoqspawn: allow configurable limiters
Eric Wong [Sat, 9 Jul 2016 03:18:34 +0000 (03:18 +0000)]
qspawn: allow configurable limiters

And bump the default limit to 32 so we match git-daemon
behavior.  This shall allow us to configure different levels
of concurrency for different repositories and prevent clones
of giant repos from stalling service to small repos.

8 years agocleanup some unnecessary use/requires
Eric Wong [Sat, 9 Jul 2016 03:18:33 +0000 (03:18 +0000)]
cleanup some unnecessary use/requires

Hopefully this can reduce memory overhead for people that
use one-shot CGI.

8 years agofeed: remove dead code and unneeded use
Eric Wong [Sat, 9 Jul 2016 03:18:32 +0000 (03:18 +0000)]
feed: remove dead code and unneeded use

We've cleaned up our code in recent days and WwwStream
provides a consistent header for our HTML pages.

8 years agowww: cleanup parameter passing
Eric Wong [Sat, 9 Jul 2016 03:18:31 +0000 (03:18 +0000)]
www: cleanup parameter passing

Reduce the size of hashes a bit and drops some unneeded hash
lookups for uncommon paths.

8 years agowww: drop unused constants
Eric Wong [Sat, 9 Jul 2016 03:18:30 +0000 (03:18 +0000)]
www: drop unused constants

We no longer generate our footer, here.  We are not currently
advertising ssoma, here.

8 years agonntp: return if a client drops on us
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

8 years agoexamples: add logrotate sample to show USR1 reopening
Eric Wong [Fri, 8 Jul 2016 21:12:26 +0000 (21:12 +0000)]
examples: add logrotate sample to show USR1 reopening

Same as nginx :>

8 years agoexamples: minimize differences for systemd examples
Eric Wong [Fri, 8 Jul 2016 21:08:33 +0000 (21:08 +0000)]
examples: minimize differences for systemd examples

Our nntpd and httpd are similar so configuration differences
should be minimized

8 years agohttp: drop extra newline in error message
Eric Wong [Fri, 8 Jul 2016 18:20:44 +0000 (18:20 +0000)]
http: drop extra newline in error message

We already add the extra newline when we call print.

8 years agohttp: additional info for write failures
Eric Wong [Thu, 7 Jul 2016 20:09:39 +0000 (20:09 +0000)]
http: additional info for write failures

There was a spurious test failure in t/httpd-corner.t
which I have not been able to reproduce.

8 years agonntpd: avoid exiting subroutine via next
Eric Wong [Thu, 7 Jul 2016 19:55:29 +0000 (19:55 +0000)]
nntpd: avoid exiting subroutine via next

Fixes: 33cef7f24d3d ("config: introduce each_inbox for iteration")
8 years agoview: per-message view links to real previous sibling
Eric Wong [Thu, 7 Jul 2016 03:03:38 +0000 (03:03 +0000)]
view: per-message view links to real previous sibling

This is closer to the behavior of thread-aware MUAs.

8 years agoview: preserve attribution for current message
Eric Wong [Thu, 7 Jul 2016 02:32:23 +0000 (02:32 +0000)]
view: preserve attribution for current message

It should be harmless if the "[this message]" text goes past
the boundary as we bold the entire line to make it stand out.

8 years agoview: reduce visual noise in conversation view
Eric Wong [Thu, 7 Jul 2016 02:25:55 +0000 (02:25 +0000)]
view: reduce visual noise in conversation view

No need for ' / ' delimiters on lines dedicated for hyperlinks.

8 years agowww: remove old footer generation code and normalize new.html
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).

8 years agoinbox: cleanup and consolidate object weakening
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.

8 years agot/git-http-backend: check BSD::Resource availability
Eric Wong [Thu, 7 Jul 2016 01:39:35 +0000 (01:39 +0000)]
t/git-http-backend: check BSD::Resource availability

We should not fail tests when this is not available.

8 years agogithttpbackend: avoid intermediate array creation from stat
Eric Wong [Thu, 7 Jul 2016 01:39:34 +0000 (01:39 +0000)]
githttpbackend: avoid intermediate array creation from stat

No need to keep an extra array around for this.

8 years agofeed: fix links to attachments in Atom feed
Eric Wong [Wed, 6 Jul 2016 02:43:41 +0000 (02:43 +0000)]
feed: fix links to attachments in Atom feed

Oops...

8 years agowww: use HTML <hr> instead of XHTML <hr />
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.

8 years agoview: fix double-escaping of ghost links
Eric Wong [Wed, 6 Jul 2016 02:05:50 +0000 (02:05 +0000)]
view: fix double-escaping of ghost links

Oops :x

8 years agoextmsg: switch to wwwstream for partial match, too
Eric Wong [Wed, 6 Jul 2016 01:37:20 +0000 (01:37 +0000)]
extmsg: switch to wwwstream for partial match, too

Another step towards a consistent WWW UI...

8 years agoextmsg: disable automatic inbox switching
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.

8 years agowwwstream: allow undef noop callback
Eric Wong [Wed, 6 Jul 2016 01:18:06 +0000 (01:18 +0000)]
wwwstream: allow undef noop callback

This can be use to specify a small response using -html_tip.

8 years agoaddress: attempt to handle comments somewhat
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.

8 years agohval: get rid of unused parameter for new_msgid
Eric Wong [Tue, 5 Jul 2016 22:39:54 +0000 (22:39 +0000)]
hval: get rid of unused parameter for new_msgid

Exposing compressed Message-IDs in URLs was a mistake,
remove a remnant of it.

8 years agodaemon: disable USR2/TTIN/TTOU/WINCH in workers
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.

8 years agoscripts/dc-dlvr: ensure temporary files are removed
Eric Wong [Wed, 6 Jul 2016 01:52:07 +0000 (01:52 +0000)]
scripts/dc-dlvr: ensure temporary files are removed

Oops :x

8 years agoexamples/varnish-4.vcl: comments and tweaks
Eric Wong [Sun, 3 Jul 2016 01:14:24 +0000 (01:14 +0000)]
examples/varnish-4.vcl: comments and tweaks

Document and simplify things a bit.  The major functional change
is we no longer waste space caching objects from dumb HTTP
clones.

8 years agoexamples: remove X-Forwarded-For mentions
Eric Wong [Sun, 3 Jul 2016 01:04:10 +0000 (01:04 +0000)]
examples: remove X-Forwarded-For mentions

We don't need to care about client IPs anywhere.

8 years agoview: remove self-linkification in thread views
Eric Wong [Sun, 3 Jul 2016 00:59:07 +0000 (00:59 +0000)]
view: remove self-linkification in thread views

There is no point for diverting readers' attention with
an unnecessary link, here.

8 years agogithttpbackend: match Content-Type of git-http-backend(1)
Eric Wong [Sun, 3 Jul 2016 00:43:12 +0000 (00:43 +0000)]
githttpbackend: match Content-Type of git-http-backend(1)

This will allow cache proxies such as Varnish to avoid
caching data sent by us.

8 years agowwwstream: wording/grammar tweaks in trailer
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.

8 years agonntp: respect 3 minute idle time for shutdown
Eric Wong [Sat, 2 Jul 2016 21:50:30 +0000 (21:50 +0000)]
nntp: respect 3 minute idle time for shutdown

This avoids breaking clients on graceful shutdown since
NNTP responses should usually be quick.

8 years agonntp: simplify update_idle_time
Eric Wong [Sat, 2 Jul 2016 21:50:29 +0000 (21:50 +0000)]
nntp: simplify update_idle_time

This ought to make things easier when we add TLS support.

8 years agoconfig: introduce each_inbox for iteration
Eric Wong [Sat, 2 Jul 2016 21:50:28 +0000 (21:50 +0000)]
config: introduce each_inbox for iteration

This fills in the internal lookup hashes and simplifies
callers.

8 years agolinkify: allow '!' in URLs
Eric Wong [Sat, 2 Jul 2016 08:25:13 +0000 (08:25 +0000)]
linkify: allow '!' in URLs

GoogleGroups URLs often contain '!' in them

8 years agowww: remove Plack::Request dependency entirely
Eric Wong [Sat, 2 Jul 2016 07:56:38 +0000 (07:56 +0000)]
www: remove Plack::Request dependency entirely

Lighter and ever-so-slightly faster!

Most importantly, this won't do non-obvious stuff behind our
backs like trying to parse a POST request body for a query
string param.

8 years agoview: rely on internal query parser for 'o' param
Eric Wong [Sat, 2 Jul 2016 07:56:37 +0000 (07:56 +0000)]
view: rely on internal query parser for 'o' param

Plack::Request will check the request body by merely
calling "param", totally unnecessary and sneaky.

8 years agowww: use PSGI env directly
Eric Wong [Sat, 2 Jul 2016 07:56:36 +0000 (07:56 +0000)]
www: use PSGI env directly

More work on on the Plack::Request/CGI.pm removal front,
No need to access the PSGI env through an extra hash lookup.

8 years agoextmsg: rework to use Inbox objects
Eric Wong [Sat, 2 Jul 2016 07:56:35 +0000 (07:56 +0000)]
extmsg: rework to use Inbox objects

This is less code and hopefully easier-to-understand.

8 years agoinbox: base_url method takes PSGI env hashref instead
Eric Wong [Sat, 2 Jul 2016 07:56:34 +0000 (07:56 +0000)]
inbox: base_url method takes PSGI env hashref instead

This is lighter and we can work further towards eliminating
our Plack::Request dependency entirely.

8 years agoTODO: clarify streaming Email::MIME replacement
Eric Wong [Sat, 2 Jul 2016 07:56:33 +0000 (07:56 +0000)]
TODO: clarify streaming Email::MIME replacement

I bet there's a billion other improvements to be made elsewhere.

8 years agoMANIFEST: update with new varnish-4 vcl example
Eric Wong [Fri, 1 Jul 2016 15:43:12 +0000 (15:43 +0000)]
MANIFEST: update with new varnish-4 vcl example

8 years agoexamples: add varnish-4.vcl
Eric Wong [Fri, 1 Jul 2016 15:36:55 +0000 (15:36 +0000)]
examples: add varnish-4.vcl

Well, I'm fumbling along with this config.  Might as well
fumble along with it publically :)

8 years agoTODO: update documentation for performance items
Eric Wong [Fri, 1 Jul 2016 15:31:14 +0000 (15:31 +0000)]
TODO: update documentation for performance items

8 years agoview: avoid redundant trailing slash for In-Reply-To
Eric Wong [Fri, 1 Jul 2016 11:10:48 +0000 (11:10 +0000)]
view: avoid redundant trailing slash for In-Reply-To

Oops, fortunately this branch is only exposed to non-Xapian
users, right now.

8 years agoaddress: filter out domain from address-as-name idents
Eric Wong [Fri, 1 Jul 2016 06:11:13 +0000 (06:11 +0000)]
address: filter out domain from address-as-name idents

It seems common for address entries to end up as:
"foo@example" <foo@example>

Avoid needlessly displaying the domain name in that case.

8 years agoexamples/README: update URL to point to our HTTPS backend
Eric Wong [Fri, 1 Jul 2016 05:32:51 +0000 (05:32 +0000)]
examples/README: update URL to point to our HTTPS backend

It's browseable, too!

8 years agot/watch_maildir: quiet down spam check warning
Eric Wong [Fri, 1 Jul 2016 02:36:34 +0000 (02:36 +0000)]
t/watch_maildir: quiet down spam check warning

Probably better than bloating our own API with configurable
warning streams and such...

8 years agowww_stream: fix stupid typo :x
Eric Wong [Fri, 1 Jul 2016 02:18:50 +0000 (02:18 +0000)]
www_stream: fix stupid typo :x

Note to self: remember to run tests

Fixes: 52052329aced ("git: allow cloning from the URL root, too")
8 years agogit: allow cloning from the URL root, too
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.

All of the following are supported:

git clone https://public-inbox.org/ public-inbox
git clone https://public-inbox.org/public-inbox
git clone https://public-inbox.org/public-inbox.git
torsocks git clone http://ou63pmih66umazou.onion/public-inbox

8 years agoupdate git repo location to https:// using GitHTTPBackend.pm
Eric Wong [Fri, 1 Jul 2016 01:03:31 +0000 (01:03 +0000)]
update git repo location to https:// using GitHTTPBackend.pm

Might as well eat our own dogfood...

8 years agogithttpbackend: allow git to be a regular scalar string
Eric Wong [Fri, 1 Jul 2016 00:42:44 +0000 (00:42 +0000)]
githttpbackend: allow git to be a regular scalar string

No point in forcing users to pass a hashref/object to
get a single git directory.

8 years agosearchview: add missing newline in search results
Eric Wong [Fri, 1 Jul 2016 00:20:20 +0000 (00:20 +0000)]
searchview: add missing newline in search results

Hrm... is there a more obvious way to do an internal API for
this while still being streamable?

8 years agowww_stream: fix search for new.html endpoint
Eric Wong [Fri, 1 Jul 2016 00:20:19 +0000 (00:20 +0000)]
www_stream: fix search for new.html endpoint

We want to avoid the bare './' wherever possible, but it
doesn't seem possible here.

8 years agoview: fix permalink and raw links at the top
Eric Wong [Thu, 30 Jun 2016 18:59:12 +0000 (18:59 +0000)]
view: fix permalink and raw links at the top

Oops :x  I really need to whip check-inbox.perl into
shape or at least start running it, again.

Fixes: e29518088b3f ("view: fix up some HTML injection via Message-ID vectors")
8 years agoview: move per-message anchor to top in conversation view
Eric Wong [Thu, 30 Jun 2016 18:53:14 +0000 (18:53 +0000)]
view: move per-message anchor to top in conversation view

This fixes the '^' (up) link in the $INBOX/new.html endpoint
for search-less displays.

8 years agosearchview: show result count in thread index, for now
Eric Wong [Thu, 30 Jun 2016 10:34:00 +0000 (10:34 +0000)]
searchview: show result count in thread index, for now

I'm not sure what to show here, actually; but it's better
than triggering an uninitialized variable warning.

8 years agoview: reference posting style article on Wikipedia
Eric Wong [Thu, 30 Jun 2016 09:51:11 +0000 (09:51 +0000)]
view: reference posting style article on Wikipedia

Storage is precious when it is forever and distributed.

And public-inbox aims to not only end Eternal September(*),
but to build a world less-centralized than Usenet ever was:
forkable discussion groups

(*) https://en.wikipedia.org/wiki/Eternal_September

8 years agoview: improve readability of msg_reply with here-doc
Eric Wong [Thu, 30 Jun 2016 09:41:52 +0000 (09:41 +0000)]
view: improve readability of msg_reply with here-doc

This should make formatting more apparent since we can rely
on <pre> semantics.

8 years agowww_stream: add response wrapper sub
Eric Wong [Thu, 30 Jun 2016 09:13:21 +0000 (09:13 +0000)]
www_stream: add response wrapper sub

This encapsulates an entire PSGI response array, hopefully
making it easier to generate responses and avoid typos when
setting the Content-Type.

8 years agoview: fixup bad reference to new_msgid
Eric Wong [Thu, 30 Jun 2016 09:06:05 +0000 (09:06 +0000)]
view: fixup bad reference to new_msgid

Oops, this endpoint needs testing :x

8 years agoMerge branch 'thread-view-skel'
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

8 years agoview: show thread size when linking to summary
Eric Wong [Thu, 30 Jun 2016 08:39:35 +0000 (08:39 +0000)]
view: show thread size when linking to summary

This should give readers a better idea of what to expect.

8 years agoview: default to flat/hybrid thread display
Eric Wong [Thu, 30 Jun 2016 08:01:39 +0000 (08:01 +0000)]
view: default to flat/hybrid thread display

This is friendlier for people on small screens and usually
eliminates the need to scroll horizontally.

8 years agoview: fix up some HTML injection via Message-ID vectors
Eric Wong [Thu, 30 Jun 2016 07:41:41 +0000 (07:41 +0000)]
view: fix up some HTML injection via Message-ID vectors

Oops, these were only introduced during the hybrid flat thread
view reworking and never deployed.

8 years agowww: reinstate old thread view as an option
Eric Wong [Thu, 30 Jun 2016 02:35:21 +0000 (02:35 +0000)]
www: reinstate old thread view as an option

This hybrid view is better than the old flat, but can
still fall down compared to the old threaded view in
some cases.

8 years agoRevert "view: update git-send-email URL"
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

8 years agoview: show more nearby messages in flat thread view
Eric Wong [Thu, 30 Jun 2016 02:35:20 +0000 (02:35 +0000)]
view: show more nearby messages in flat thread view

Context is important, but so is conserving precious screen
space.  Decisions :<

8 years agoview: tweak thread/index header slightly
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.

8 years agofeed: add $INBOX/new.html endpoint
Eric Wong [Thu, 30 Jun 2016 02:35:18 +0000 (02:35 +0000)]
feed: add $INBOX/new.html endpoint

This acts like the Atom feed; but should be viewable directly
from browsers.

8 years agoview: merge $state hash with existing $ctx
Eric Wong [Thu, 30 Jun 2016 02:35:17 +0000 (02:35 +0000)]
view: merge $state hash with existing $ctx

This reduces the level of indirection to reach certain objects
within the hash and there are no namespace or lifetime conflicts
anyways.

8 years agoview: show thread context in the thread-aware flat view
Eric Wong [Thu, 30 Jun 2016 02:35:15 +0000 (02:35 +0000)]
view: show thread context in the thread-aware flat view

This lets user have a small window of the context of
the current message relative to other threads.

8 years agowww: use WwwStream for dumping thread and search views
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.

8 years agowww: implement hybrid flat+thread conversation view
Eric Wong [Thu, 30 Jun 2016 02:35:13 +0000 (02:35 +0000)]
www: implement hybrid flat+thread conversation view

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.

8 years agoview: HTML escape mailto: link
Eric Wong [Mon, 27 Jun 2016 21:13:41 +0000 (21:13 +0000)]
view: HTML escape mailto: link

Oops, we cannot have bare '&' in mailto: links, either.

8 years agoview: attribute in parent link for permalink message
Eric Wong [Mon, 27 Jun 2016 21:07:51 +0000 (21:07 +0000)]
view: attribute in parent link for permalink message

Oops, but apparently this does not trigger errors?

8 years agoinbox: avoid trying s// on undef
Eric Wong [Sun, 26 Jun 2016 23:41:00 +0000 (23:41 +0000)]
inbox: avoid trying s// on undef

Oops, I guess I'm trigger-happy today.

Fixes: 31a6ff1221fe ("inbox: ensure we do not show leading "From " lines")
8 years agoinbox: ensure we do not show leading "From " lines
Eric Wong [Sun, 26 Jun 2016 23:36:36 +0000 (23:36 +0000)]
inbox: ensure we do not show leading "From " lines

Some messages will be misimported due to an old bug,
clean them up and ensure we do not propagate the mistake.

Followup-to: a0c07cba0e5d ("mda: drop leading "From " lines again")
8 years agomda: drop leading "From " lines again
Eric Wong [Sun, 26 Jun 2016 23:06:48 +0000 (23:06 +0000)]
mda: drop leading "From " lines again

Oops...

While we're at it, drop blank lines before the "From ", too,
since it could happen.

8 years agospamcheck/spamc: fix compatibility with Perl 5.14.2
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).

8 years agowatch_maildir: warn on spam check failures
Eric Wong [Sun, 26 Jun 2016 06:24:25 +0000 (06:24 +0000)]
watch_maildir: warn on spam check failures

It would be nice to know about spamcheck failures.

8 years agowww: unescape '+' in query parameter to space
Eric Wong [Sun, 26 Jun 2016 03:46:56 +0000 (03:46 +0000)]
www: unescape '+' in query parameter to space

Fixes: fbcb7de93884b ("www: remove a few more Plack::Request dependencies")
8 years agoTODO: add a few Xapian-related items
Eric Wong [Sat, 25 Jun 2016 22:27:55 +0000 (22:27 +0000)]
TODO: add a few Xapian-related items

"git cat-file --batch" seems expensive for big repos and
loading 70K+ tree objects in git isn't all that fast.

Ideas are cheap, time, code, and testing are not :P

8 years agowww_stream: linkify cloneurl entries if they're HTTP/HTTPS
Eric Wong [Sat, 25 Jun 2016 22:05:35 +0000 (22:05 +0000)]
www_stream: linkify cloneurl entries if they're HTTP/HTTPS

They may be other public-inbox instances which are browseable,
so provide a link to them to encourage their use as clones.

8 years agoview: safer and optional quoting for --in-reply-to arg
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.

8 years agoaddress: remove Address::from_name
Eric Wong [Sat, 25 Jun 2016 10:56:59 +0000 (10:56 +0000)]
address: remove Address::from_name

Address::names is sufficient to handle what from_name did.

8 years agoview: show To/Cc destinations in conversation view
Eric Wong [Sat, 25 Jun 2016 09:27:16 +0000 (09:27 +0000)]
view: show To/Cc destinations in conversation view

It is important to show the decentralized nature of
communication in our web views.

8 years agoaddress: beef up the module with name list extaction
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.

8 years agoinbox: do not weaken already-weak refs
Eric Wong [Fri, 24 Jun 2016 23:40:01 +0000 (23:40 +0000)]
inbox: do not weaken already-weak refs

This quiets a (hopefully harmless) warning when a ref remains
alive through several expiry timeouts.