about summary refs log tree commit homepage
DateCommit message (Collapse)
2015-09-21nntp: proper UTF-8 support (hopefully?)
RFC 3977 stipulates the use of UTF-8 as the default charset, so we shall try using that and hopefully not mangle things.
2015-09-21remove bytes:: for length checks
Apparently, my mental model of Perl internals is still incorrect after all these years. I am but a simple *nix programmer: everything is a bag of bytes to me. This fixes a problem with UTF-8 headers from Xapian (via "XHDR Subject [range]") triggering partial writes and writing an extra newline to the outputs.
2015-09-21t/nntpd.t: improve test runnability
The created socket FD number may not be 3 in the test, force it to be so inside the child process.
2015-09-21nntp: speed up xover slightly
Reserializing the message to a string to check size wastes considerable time and should be able to get by with slightly less accuracy.
2015-09-21nntp: speed up XHDR Xref for rtin
We could also start displaying Xref in XOVER as rtin seems to prefer it. Anyways this is nearly 100 times faster now and requires no DB changes.
2015-09-21msgmap: minor cleanup to move constant declaration
This doesn't actually change anything as the constant is still usable in other subroutines, but helps with consistency and readability IMHO.
2015-09-20nntp: add "newsgroup" parameter and sort grouplist
Using non-hierarchical mailing list names for newsgroups might confuse traditional newsreader software and perhaps some humans. Allow administrators to configure newsgroups names and hierarchies to their liking. Sorting the grouplist alphabetically should probably be done anyways to improve usability for some clients which won't sort themselves.
2015-09-20newsgroup: use only the first address
public-inboxen may be aliased to multiple email addresses, and we have always favored the first.
2015-09-20nntp: fix handling of trickled responses
We cannot use the push_back_read functionality of Danga::Socket since it will trigger event_read on buffered data. This would allow a malicious (or badly implemented) client to burn CPU without actually sending us anything. So we still do buffering ourselves and play some tricks with timers re-enable readability.
2015-09-20nntp: do not re-enable reads during long responses
Long responses may leave the buffer momentarily empty, but we must prevent read events from firing at that point.
2015-09-20nntpd: support systemd FD inheritance + signals
Avoid depending on IO::Socket::INET if we can help it, we do not need to bloat ourselves with lot of that functionality.
2015-09-19nntp: article lookups by Message-ID may cross newsgroups
Lynx seems to rely on this behavior for "ARTICLE <message-id>" Tested with Lynx Version 2.8.8dev.12 (22 Feb 2012) on Debian wheezy.
2015-09-19nntp: log to FDs given by the Nntpd module
This will allow us to redirect stdout/stderr more easily for logging.
2015-09-19nntp: fix ARTICLE/HEAD/BODY/STAT
Article number is optional, but we need to update the article number of the client connection if it was specified (but not if it was given a Message-ID) as stipulated by RFC 977
2015-09-19nntp: fix logging of long responses
It's misleading to show short times on long responses. Instead, show the long response as a separate entry on completion or failure.
2015-09-19nntp: implement XPATH
This may be helpful for sorting out duplicates.
2015-09-19nntp: implement XROVER, speed up XHDR for some cases
Using Xapian allows us to implement XROVER without forking new processes.
2015-09-19nntp: speed up XHDR for the Message-ID case
We can use our msgmap database to implement "XHDR Message-ID [range]" commands quickly. This helps immensely with slrnpull, which prefers XHDR to LISTGROUP for some reason...
2015-09-19nntp: XOVER does not require range
XOVER uses the current article if no range is given as stipulated in RFC 2980.
2015-09-19nntp: implement command argument checking
Validate commands to make sure we do not accidentally screw up some things or leave out some argument checking.
2015-09-19nntp: use long response API for LISTGROUP
LISTGROUP can be expensive for giant groups, too. Use the long response API to improve fairness and prevent excessive buffering.
2015-09-19nntp: introduce long response API for streaming
XOVER, NEWNEWS, XHDR responses may be arbitrarily long and cause memory usage via buffering. This problem would exist even if we were to optimize them by caching headers for fast retrieval and search. Introduce a generic API to handle all of these commands fairly without triggering excessive buffering and unfairness of the existing implementation. Generating these responses is still expensive for now, but at least the implementation is fair to other clients and prevents one client from using one of these commands to monopolize resources away from other clients.
2015-09-19nntp: use write_buf_size instead write_buf
It is shorter code and probably faster than checking an array.
2015-09-18read-only NNTP server
Implementing NEWNEWS, XHDR, XOVER efficiently will require additional caching on top of msgmap. This seems to work with lynx and slrnpull, haven't tried clients. DO NOT run in production, yet, denial-of-service vulnerabilities await!
2015-09-16view: do not shorten top-level messages in thread view
The thread root is usually the most important, and should be displayed in full.
2015-09-15add cgit commit-filter example
public-inbox has search functionality, so take advantage of good commit messages with proper titles to lookup discussion.
2015-09-15INSTALL: document DBD::SQLite and DBI dependencies
They're optional, but probably highly useful.
2015-09-15extmsg: wire up to use msgmap for prefixes
DBI + DBD::SQLite has much better handling of prefix lookups than Xapian. While we're at it, avoid linking blatantly wrong Message-IDs to external services.
2015-09-15searchidx: sync Msgmap database along with Xapian
We can avoid duplicating work of extracting messages from git if we tie this to Xapian. Of course, this ties the two features together, but it's probably reasonable to expect that anybody who wants to use public-inbox to serve messages to front-end users will have both.
2015-09-15searchidx: hoist out rlog code
We'll be reusing this for loading msgmap.
2015-09-15msgmap: add message mapping via SQLite
This will allow us to maintain stable article numbers for an NNTP server independently of Xapian.
2015-09-14searchview: do not link Atom feed by relevance
Atom feeds only make sense when sorted by time, not when our search indexing rules change and affect relevance. So do not include the relevance option when linking to Atom feeds. However, we shall still honor the 'r' query parameter in case somebody wants to manually include that in the URL for testing/experimental purposes. We simply will not advertise it.
2015-09-13view: jump to anchor of current message on References
Otherwise it could be a bit disorienting to jump to the first message in the thread without navigation context.
2015-09-13view: do not show References unless a message has them
It's a waste of space and potentially confusing.
2015-09-13view: use header_obj to avoid extra method calls
Email::MIME will call the header_obj each time anyways, avoid the extra method lookups and hit header_obj directly for the header lookup.
2015-09-13view: extra Atom feed link in standalone message view
It might be helpful if user agents do not display the <link> element in <head>.
2015-09-13view: add Atom links in headers for per-message links
Some user agents will advertise the presence of a feed this way for users to subscribe to individual topics.
2015-09-13searchview: implement Atom feed for search results
This can be helpful for folks who want to subscribe to a particular topic or keyword.
2015-09-13feed: consolidate updated tag generation
We'll be reusing this code further in the next commit.
2015-09-12searchview: support displaying entire threads
This hopefully makes it easy to perform queries to display an entire thread. Raise the limit in the threaded view to display more results and hopefully improve the output of thread display.
2015-09-12searchview: hoist out subroutines for clarity
We'll be expanding the search view to handle expanded views.
2015-09-12view: more consistent prefix for ghost links
This will be reused for search views.
2015-09-11examples/public-inbox.psgi: optional deflater
The deflater middleware isn't standard Plack, so don't require potential users install it.
2015-09-10constent X?HTML MIME type filtering
Filter and View should reject X?HTML the same way.
2015-09-07view: change References link to expand thread
The expanded thread view is generally more useful. Having links to more links at the bottom seems to a waste of navigation time. However, keep the '#r' anchor in case people rely on it for links.
2015-09-06public-inbox-init: use absolute path
We actually have no business expanding (e.g. translating ~ to $HOME) paths from the command-line argument, the shell does that. However, we need to make the path absolute instead.
2015-09-06update copyright headers and email addresses
In the future, it should be possible to use this: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-09-06Makefile.PL: conform to naming conventions
Not that we actually have a bare PublicInbox module, yet. Maybe MID can be it.
2015-09-05extmsg: add note about the deficiency of the implementation
ref: http://public-inbox.org/meta/20150905091457.GA27857@dcvr.yhbt.net/
2015-09-05searchview: link users to permalink instead of thread
The permalink should load faster if the user had a good query and users can easily find the rest of the message in the thread.