Eric Wong [Thu, 25 Feb 2016 04:02:35 +0000 (04:02 +0000)]
use pipe for git-http-backend output
This allows us to stream the output to the client without buffering
everything up-front. Next, we'll let Danga::Socket (or AE in the
future) wait for readability.
Eric Wong [Thu, 25 Feb 2016 03:57:16 +0000 (03:57 +0000)]
hval: implement common UI for protocol-relative URLs
This allows users to avoid HTTPS -> HTTP downgrade warnings,
but we will also avoid encouraging them towards HTTPS, for now.
IMHO: the CA system gives a false sense of security,
TLS libraries (e.g. OpenSSL) can introduce new bugs and
problems (even to attack clients), and TLS libraries
also eats memory on cheap servers.
Eric Wong [Tue, 23 Feb 2016 02:52:18 +0000 (02:52 +0000)]
initial public-inbox-httpd implemenation
This is meant to provide an easy starting point for server admins.
It provides a basic HTTP server for admins unfamiliar with
configuring PSGI applications as well as being an identical
interface for management as our nntpd implementation.
This HTTP server may also be a generic Plack/PSGI server for
existing Plack/PSGI applications.
Eric Wong [Mon, 22 Feb 2016 01:36:27 +0000 (01:36 +0000)]
extmsg: support "//" protocol-relative URLs
Avoid unintentionally switching protocols if the external site
we're linking to supports both HTTP and HTTPS.
We do not want to force HTTPS everywhere because potential
bugs and performance problems in the TLS stack may outweigh
the privacy benefits. Leave up to site authors and users
to decide whether they want HTTPS or plain old HTTP.
Eric Wong [Mon, 8 Feb 2016 11:20:59 +0000 (11:20 +0000)]
view: simplify topic handling based on subjects
Dropping "[FOO]" prefixes for the purposes of summarization
is tricky and we end up with odd display behavior.
Just show Subject line changes as the writer intended
(with the exception of normalization to strip the "Re: ")
Eric Wong [Sun, 7 Feb 2016 08:35:29 +0000 (08:35 +0000)]
support smart HTTP cloning
This requires POST and (small file) upload support from the
PSGI/Plack web server. CGI.pm is currently not supported with
this feature.
We'll serve everything git can handle by default for performance
in the general case.
To avoid introducing cognitive overhead for sysadmins managing
existing HTTP backends, we do not introduce new configuration
directives.
Thus, setting http.uploadpack=false in the relevant git config
file for each public-inbox (ssoma) git repo will disable smart
HTTP for CPU/memory-constrained systems.
Technically we could support http.receivepack to allow posting
messages to a public-inbox over HTTP(S), but that breaks
the public-inbox model of encouraging users to Cc: everyone.
Again, we encourage users to Cc: everyone to reduce the chance
of a public-inbox becoming a centralized point of
failure/censorship.
Eric Wong [Tue, 2 Feb 2016 04:00:08 +0000 (04:00 +0000)]
www: support git cloning via dumb HTTP
This is enabled by default, for now.
Smart HTTP cloning support will be added later, but it will
be optional since it can be highly CPU and memory intensive.
Eric Wong [Mon, 1 Feb 2016 04:06:08 +0000 (04:06 +0000)]
doc: misc cleanups and whitespace additions
Add a few newlines for readability (perhaps at the expense of
economy). Stop mentioning "Open Source" as it is redundant
and "Free Software" fits our goals, better.
Eric Wong [Sat, 30 Jan 2016 23:28:37 +0000 (23:28 +0000)]
view: cleanup permalink Thread: header display
The word "skip" can be confusing. Instead, spell out "scroll down"
for the user to read and only display that text when the thread
is sufficiently long.
Eric Wong [Sat, 30 Jan 2016 23:27:18 +0000 (23:27 +0000)]
view: do not kill whitespace in permalink thread timestamp
There's no need to HTML escape a timestamp we generate ourselves.
We need to preserve the leading space and can't use the "oneline"
semantics to preserve alignment.
Eric Wong [Thu, 31 Dec 2015 07:37:17 +0000 (07:37 +0000)]
view: fixup indentation nesting in search
Oops, the rarely-accessed threaded search view was completely
broken. Additionally, the normal threading depths were broken
when we attempted to go up-thread and replies got nested
improperly
Eric Wong [Wed, 30 Dec 2015 21:34:10 +0000 (21:34 +0000)]
view: thread using <ul> instead of <table>
On second viewing, this does render small cues which makes the
output more pleasant for lynx users. We avoid injecting the
root (level=0) message into a list since it still wastes
precious horizontal whitespace on small displays.
This also results in small reductions in bandwidth usage as
it takes fewer tags/whitespace to render unordered lists.
Eric Wong [Sat, 26 Dec 2015 22:01:16 +0000 (22:01 +0000)]
doc: minor updates to trim down the README
We'll continue developing and supporting ssoma, but it's unlikely to
gain much adoption in its current form; so stop cluttering up our
own README with it.
Eric Wong [Sat, 26 Dec 2015 01:26:40 +0000 (01:26 +0000)]
use "Atom feed" consistently in headers/footers
While having the extra " feed" is noisy in the main topic
landing page, it is useful in headers/footers which have
plenty of space to be more descriptive.
Eric Wong [Sat, 26 Dec 2015 01:14:27 +0000 (01:14 +0000)]
searchview: fix unclosed tags in threaded search results
Oops, we've had this forever and we also lacked a space
between the this was noticed while adding an extra
line between the "Search results ordered by" header
and actual messages.
Eric Wong [Sat, 26 Dec 2015 01:11:15 +0000 (01:11 +0000)]
view: reduce main landing page weight
Hopefully, "mbox.gz" is sufficiently understandabe that
we can get rid of the "title" attribute in <a> tags
(we already omitted the title in other pages).
Additionally, drop the '@' in front of the date.
The date should be obvious and is not necessary for
headers without author attribution.
Eric Wong [Fri, 25 Dec 2015 11:48:27 +0000 (11:48 +0000)]
view: favor whitespace wrap in <head>
If we bite the bullet and rely on inline CSS, we might as well
only specify it once per page instead of inline in every <pre>
tag which may handle UGC. So this actually saves us a small
amount of bandwith on most pages which have multiple <pre>
start tags.
Eric Wong [Fri, 25 Dec 2015 09:35:38 +0000 (09:35 +0000)]
view: move thread info near top of single view
Most framed mail viewing software has message ancestry
information near the top instead of bottom (mutt, gmane,
sylpheed, thunderbird) as it can help improve context.
Traditional netiquette also favors writing replies below
quoted (older) text for this reason; so move the thread
summary to the top of the message for context.
Since threads may be long, add a "skip" anchor link to jump to
the message body quickly, and align the date to the left column
so it's easier to tell the relative age of messages.
While we're at it, remove quotes from "id" attributes to
improve ease-of-grep-ability.
Eric Wong [Thu, 17 Dec 2015 05:37:31 +0000 (05:37 +0000)]
git: cat-file wrapper enhancements
The "cat_file" sub now allows a block to be passed for partial
processing. Additionally, a new "check" method is added to
retrieve only object metadata: (SHA-1 identifier, type, size)
Eric Wong [Sun, 6 Dec 2015 03:14:03 +0000 (03:14 +0000)]
view: fix message truncation logic
Avoid truncating messages if we requested the root anchor.
This regression appeared in
commit 62ee3cb36dd08f17e444e96dc80108464ee10cba
("view: do not shorten top-level messages in thread view")
Also, make the "More..." link more prominent, as readers
should be made aware they're not reading the full message.
Eric Wong [Sat, 5 Dec 2015 02:08:01 +0000 (02:08 +0000)]
*view: avoid leading zero in time display of the hour
Avoid the visual noise entirely by using a space instead.
I sometimes have difficulty distinguishing '0' from '8' while
other users may mistake it for an 'O' character. Most digital
clocks I've seen will omit displaying a leading zero for the
hour, too.
This may also save transfer time by allowing better compression
(since there is a space between the date and time anyways) and
perhaps reduce client rendering time on some displays.
We'll leave the leading zero for minutes since that seems pretty
standard for digital clocks.
Eric Wong [Wed, 18 Nov 2015 19:40:22 +0000 (19:40 +0000)]
view: further reduce size of attribution/timestamp
The "by" on the message page and "-" in the index are
unnecessary and readers should have no trouble figuring out
what the attribution/timestamp line means.
Eric Wong [Thu, 8 Oct 2015 00:49:04 +0000 (00:49 +0000)]
view: remove attribution for topics in top-level view
It clutters up the page unnecessarily, as identity of the topic
starter/updater probably doesn't matter if there's no exact
message to attribute the message to.
Eric Wong [Mon, 5 Oct 2015 04:44:28 +0000 (04:44 +0000)]
README: add OpenSSL exception
Network connections may use OpenSSL for TLS (as other libraries,
such as GNUTLS do not appear well-supported under Perl). So
give this exception in case somebody needs TLS support for NNTP.
Eric Wong [Sat, 3 Oct 2015 10:18:07 +0000 (10:18 +0000)]
mda: support a 'filter=scrub' option for external lists
For list where we are not the primary archival entry point,
defaulting to filter=scrub makes sense since their list
conventions may be more tolerant of HTML and other crap
than we are.
Eric Wong [Sat, 3 Oct 2015 10:02:33 +0000 (10:02 +0000)]
drop Message-IDs longer than 244 bytes
Xapian has this limit for terms, and there are likely no
legitimate Message-IDs (or single header lines) this long; so
there's no need to workaround this limit.
Eric Wong [Fri, 2 Oct 2015 18:35:12 +0000 (18:35 +0000)]
Msgmap: pass ReadOnly DBI flag for non-writable opens
This doesn't seem to do anything on my older system, but maybe it
will in newer or future versions of DBD::SQLite. Anyways it can
be helpful for documentation purposes, too.
Eric Wong [Thu, 1 Oct 2015 20:44:27 +0000 (20:44 +0000)]
filter: more consistent labeling of rejections
While we're at it, reject non-plain-text top-level messages,
too. They probably do not exist in practice, but we cannot
afford to scrub given policies implemented by overzealous
mail providers.
While we're at it, update the comment for strip_multipart.
Eric Wong [Thu, 1 Oct 2015 05:57:19 +0000 (05:57 +0000)]
view: correctly pick latest in index anchor links
The last message in a thread _display_ is not necessarily the
latest message in the thread. We must go by the Date: header
on the messages themselves as a best-guess. Of course Date:
headers may lie, but most mail clients trust them by default,
so we will, too.