about summary refs log tree commit homepage
path: root/lib
DateCommit message (Collapse)
2016-04-25split out NNTPD and HTTPD* modules
Hopefully this modularizes things a little and allows us to work on a combined super server to save RAM.
2016-04-25mda: don't clobber existing List-Id header
We may be importing mail from other lists, so do not clobber the existing List-Id header.
2016-04-25searchview: 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")
2016-04-25www: 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
2016-04-25view: fix link generation for replies in threads
Oops, gotta test this :x
2016-04-24view: 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.
2016-04-24view: more consistent prefixing for thread skeletons
This will allow potential tinkerers to switch away from the '` ' prefix more easily.
2016-04-21mda: 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/
2016-04-16view: 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.
2016-04-15view: 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.
2016-04-15www: 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.
2016-04-14view: 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.
2016-04-13www: 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.
2016-04-13view: fix link to view replies from $MESSAGE_ID/f/ links
Oops, $MESSAGE_ID/f/R/ screws up rather badly.
2016-04-13searchview: 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)
2016-04-12mbox: 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.
2016-04-12view: 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.
2016-04-12import: 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.
2016-04-11import: 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).
2016-04-11import: 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
2016-04-11import: 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.
2016-04-11git: add support for qx wrapper
This lets us one-line git commands easily like ``, but without having to remember --git-dir or escape arguments.
2016-04-11mbox: unconditionally add trailing newline
This may be necessary for compatibility with non-mboxrd aware parsers which expect "\nFrom " for everything but the first record.
2016-04-09filter: remove out dated comments
Followup-to commit 5a590bcb6813 ("filter: preserve Mail-Followup-To and Mail-Reply-To")
2016-04-09filter: 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
2016-04-06view: 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.
2016-04-06view: 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.
2016-04-06view: 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.
2016-04-06view: eliminate dead code and hash fields
These were the vestigial remains of our previous use of of Message-ID compression.
2016-04-06http: 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.
2016-04-05view: 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.
2016-04-04http: 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.
2016-04-02www: more explicit "git clone" usage
Little harm in having the entire command-line for users and avoiding the cognitive overhead of figuring out $URL.
2016-04-02www: 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.
2016-03-17daemon: 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.
2016-03-12feed: fix brain farts in new_oneline removal
Ugh... Fixes: 476fc666c223 (reduce "PublicInbox::Hval->new_oneline" use)
2016-03-12searchmsg: 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.
2016-03-12reduce "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.
2016-03-12http: 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.
2016-03-12http: 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.
2016-03-11daemon: 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")
2016-03-08daemon: 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.
2016-03-06http: 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.
2016-03-06http: 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.
2016-03-06http: 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.
2016-03-05daemon: sockname detects listeners correctly
This means we can avoid false-positives when inheriting multiple Unix domain sockets.
2016-03-05daemon: document optional Net::Server dependency
Non-socket activation users will want to install Net::Server for daemonization, pid file writing, and user/group switching.
2016-03-05feed: remove unnecessary encoding lookup
We handle encoding-related things elsewhere.
2016-03-05daemon: simplify parent death handling
No need to create a new sub which kill ourselves $$ when we can invoke worker_quit directly.
2016-03-05daemon: 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.