about summary refs log tree commit homepage
path: root/lib
DateCommit message (Collapse)
2015-09-01www: root atom feed is "new.atom" and not "atom.xml"
The MIME type entry for Atom feed relies on "atom", so allow properly-configured static file servers to serve it with the correct Content-Type header.
2015-09-01www: compile mbox regexp only once
No need for 'x' modifier to span more lines, though
2015-09-01implement per-thread Atom feeds
This allows users to subscribe to only a single thread with their feed reader without subscribing to the rest of the thread. Update our endpoint notes while we're at it.
2015-09-01feed: extract atom header generation
We'll be using it for per-thread subscriptions
2015-09-01feed: use updated date based on git commit date
This will hopefully make life easier for feed readers.
2015-09-01search: show newest results first
Like revision control history, older stuff is less relevant, so favor newer stuff, first.
2015-09-01search: allow querying all mail with ''
This makes dumping recent topics easier, hopefully.
2015-09-01search: reduce redundant doc data
Redundant document data increases our database size, pull the smsg->mid off the unique term, the smsg->ts off the value, and only generate the formatted display date off smsg->ts.
2015-08-30www: avoid BEGIN block for config loading
It fails the syntax check if a user does not have ~/.public-inbox/config setup. Anyways we can safely use ||= on a global since we do not support threads.
2015-08-30view: avoid broken parent link in per-message view
Broken by commit f24d362fb0959cdfab37a6da0a66a985764a2752 ("view: display thread outline in single-message view")
2015-08-30view: remove "threadlink" from thread view
We're already inside the thread, and our thread summary inside /m/$MESSAGE_ID/ is already sufficient got navigate back to the /t/$MESSAGE_ID/ page. So I think it's sufficient to keep the /t/$MESSAGE_ID/ page lighter with fewer links and avoid introducing strange terminology. In contrast, "permalink" is relatively well-known and not an alien term to readers: https://en.wikipedia.org/wiki/Permalink
2015-08-30view: remove "threadlink" name in per-message view
It's a strange word and I'm not quite comfortable with it in a message view. Instead, use a descriptive link for the thread headers.
2015-08-30mid2path: clean MID of angle brackets '<>'
We screwed up and needed to fix URL generation with '<>' in them. Regardless, users may attempt to copy and paste URLs with '<>' in them, do not punish them for that.
2015-08-30view: fix broken threadlink
This regression was accidentally introduced in commit f24d362fb0959cdfab37a6da0a66a985764a2752 ("view: display thread outline in single-message view")
2015-08-30search: do not index references and inreplyto terms
We no longer need them, as we can rely on index-time thread resolution and thread merging. This allows us to index less data and hopefully increase efficiency.
2015-08-30view: display thread outline in single-message view
If Xapian search is available, we can load most of the entire thread and show a more meaningful navigation tree than the References: and In-Reply-To: headers. Searching on those headers themselves is unreliable because it is possible for clients to omit some references.
2015-08-30view: update linkification regexp to be more domain sensitive
This avoids capturing links such as "http://#{foo}" => "http://#" inside diffs
2015-08-29view: remove dead commented line
Not needed since commit 9a2931759c3dcbd879728b49151aa3f8a641b506 ("wire up to display non-suffixed Message-ID links")
2015-08-29avoid length in boolean context
Perl does not currently optimize for this. ref (from p5p): http://mid.gmane.org/D5C27970-9176-4C7A-8B99-7D78360E67A2@pobox.com
2015-08-28search: do not iterate through entire termlist
A document may have many terms, so this hurts performance if we blindly iterate. Unfortunately, we can't rely on the order of the termlist just yet, either, so we must repeatedly restart the search for now until we're ready to bump schema versions.
2015-08-28search: do not load type into metadata
Our search query already filters out ghost messages, so it's wasteful to have type information loaded.
2015-08-28GitCatFile: remove unnecessary FD_CLOEXEC setting
Unless some idiot raises $^F, we should not have to care about the close-on-exec flag. Everything since Perl 3.0 seems to set it by default, and 5.6 got more consistent about it.
2015-08-27view: fix short followup links
This was broken by commit 9a2931759c3dcbd879728b49151aa3f8a641b506 ("wire up to display non-suffixed Message-ID links")
2015-08-27filter: reject bad attachments outright
Might as well be strict about it for new lists. Importing old archives might be more of a challenge, though.
2015-08-27implement legacy redirects for old URLs
We should not break existing URLs. Redirect them to the newer, less-ambiguous URLs to improve cache hit ratios.
2015-08-27wire up to display non-suffixed Message-ID links
These URLs are preferable in case somebody decides to get cute and use a suffix we would've used to prevent others from linking to their message. The common /m/$MESSAGE_ID/ URLs are now 4 characters shorter so may fit better on terminals.
2015-08-27mid: extract Message-ID from inside '<>'
This is necessary for some mailers which include comment text in in the In-Reply-To header, merely assuming there is nothing outside of '<>' as we were doing is not enough.
2015-08-27wire up shorter, less ambiguous URLs
We will prefer URLs without suffixes for now to avoid ambiguity in case a Message-ID ends with ".html", ".txt", ".mbox.gz" or any other suffix we may use. Static file compatibility is preserved by using a trailing slash as most servers can/will fall back to an index.html file in this case. For raw text files, we will follow gmane's lead with "/raw"
2015-08-27www: minor cleanups to shorten code
Less scrolling is more efficient.
2015-08-27www: reduce unused arguments in internal API
Less code is easier-to-manage, although we make a few extra hash insertions now.
2015-08-26mbox: close file handle for single mbox
This doesn't seem needed for actual server use, but Plack tests complain about it
2015-08-25feed: fix "created" vs "updated" diff in topics
This fixes a regression introduced in commit 72c0f7c71ff28de9755dc4aee8b6ce6f0e4f2ed7 (feed: merge subjects regardless of "[PATCH vN]")
2015-08-25filter: loosen regexp on type matches
part_type still contains the filename, unfortunately, so PGP signatures were truly stripped. Oh well, nobody cares to verify PGP signatures anyways.
2015-08-25feed: merge subjects regardless of "[PATCH vN]"
This normalizes rerolled patches with identical topics, but does not normalize different patches even if they are in the same thread (for now).
2015-08-25search: implement subject summarization
We ought to summarize subjects to avoid exploding line lengths in the web interface.
2015-08-25mid: mid_compressed => mid_compress
Consistently name mid_* functions as verbs.
2015-08-25search: only sort by relevance if requested
Many of our internal search queries do not care about relevance, but is used for proper thread displays.
2015-08-24view: refactor $state as a hash
Using hash means we no longer have to document and remember what every field does. The original array form was insane premature optimization and crazy. Who wrote that? Oh wait, I was on drugs :<
2015-08-24mda: remove unnecessary import
Relying on Email::MIME means encoding is handled transparently for us.
2015-08-23view: simplify root filtering in followup display
The root message-ID may be too long to compare. Instead, check fields based on the consistency of our DB.
2015-08-23view: case-insensitive "Re:" check for replies
This is to match what Mail::Thread nad our own search relies on. However, we will be more lenient on spaces, though.
2015-08-23cleanup calls to header_obj
Dereference header_obj only once when performance may be critical, or simplify our code by calling "header" directly on the Email::{Simple,MIME} object if not.
2015-08-23hopefully fix broken permissions for search
We must preserve the umask for the entirety of the indexing operation, as Xapian transactions replace entire files atomically instead of writing them in place.
2015-08-23cleanup Email::Address usage
Email::Address::name never fails assuming it was able to parse anything.
2015-08-23search: respect core.sharedRepository in for Xapian DB
Extend the purpose of core.sharedRepository to apply to the $GIT_DIR/public-inbox/xapian* directory.
2015-08-23feed: r= parameter supports "HEAD" as a revision
public-inbox git repositories require a "HEAD" ref to function correctly anyways.
2015-08-23GitCatFile: use offset for read instead of appending
There is no need to perform string appends when the "read" and "sysread" functions take an offset argument to append to the given buffer. This avoid needless string creation.
2015-08-23mbox: clarify our use of the the mboxrd variant
Commenting it in the From: line seems appropriate and reduces compatibility problems in case a MUA cannot handle trailing comments after the timestamp.
2015-08-23mbox: use mboxrd quoting rules
This redundantly quotes >From from to prevent losing information as described by qmail
2015-08-23.txt links return an mbox instead
This improves compatibility and allows individual messages to be concatenated into an existing mbox without further modifications. "git format-patch" does something similar (but does not do "From " line escaping(!))