Date | Commit message (Collapse) |
|
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.
|
|
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.
|
|
We'll be reusing this for loading msgmap.
|
|
This will allow us to maintain stable article numbers for an
NNTP server independently of Xapian.
|
|
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.
|
|
Otherwise it could be a bit disorienting to jump to the
first message in the thread without navigation context.
|
|
It's a waste of space and potentially confusing.
|
|
Email::MIME will call the header_obj each time anyways, avoid
the extra method lookups and hit header_obj directly for the
header lookup.
|
|
It might be helpful if user agents do not display the <link>
element in <head>.
|
|
Some user agents will advertise the presence of a feed this
way for users to subscribe to individual topics.
|
|
This can be helpful for folks who want to subscribe
to a particular topic or keyword.
|
|
We'll be reusing this code further in the next commit.
|
|
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.
|
|
We'll be expanding the search view to handle expanded views.
|
|
This will be reused for search views.
|
|
Filter and View should reject X?HTML the same way.
|
|
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.
|
|
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
|
|
ref: http://public-inbox.org/meta/20150905091457.GA27857@dcvr.yhbt.net/
|
|
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.
|
|
In case a URL gets truncated (as is common with long URLs),
we can rely on Xapian for partial matches and bring the user
to their destination.
|
|
We should not need to use QueryParser for internal queries,
but rather for external ones.
We'll also be exposing searching Message-IDs with the "mid:" prefix
for broken mids on some servers, and enabling partial searching
with 'm' to help with URL truncations.
Since thread IDs may be volatile, they cannot be exposed to the
public, there's no reason to expose them to the query parser,
either.
Also, add 's:' as an alternative probabilistic prefix to 'subject'
as it is shorter.
|
|
Perhaps this can be optionally enabled in the future for smaller
sites.
|
|
Xapian may raise exceptions on some queries. Pass the error
along to the user so they can read Xapian documentation.
|
|
Might as well give relevance some weight if the timestamp is tied.
|
|
We'll be moving atom and thread display support inline
and reducing endpoints. Maybe it makes sense, maybe not.
|
|
Aallow navigating backwards and forwards, as some pages will be
bookmarked or some browsers may not have history. Also add a
link back to the index where they presumably came from.
While we're at it, limit the number of results we have to 25
for now to avoid making the page too big and wasting clients
memory for irrelevant results.
|
|
This hopefully makes it easier to find things without resorting
to proprietary external services.
|
|
Once again, the regression was introduced in
commit 16ca6b7a57266fcb466ffff005bc1d644bad14c1
(view: avoid attempting to find "subject dummy")
|
|
Omitting a slash should not be fatal if unambiguous. Add
fallbacks so users who expect a directory structure-like
experience can have it at the cost of one extra HTTP
request/response pair.
This matches behavior of static sites.
|
|
Non-top-level messages still deserve to be shown in full
if they're the message in the URL.
|
|
This makes the layout between the permalink threads and
index threads more consistent; hopefully.
|
|
No point in repeating authorship when PATCH messages are
threaded and it's obvious from the top message who the author
is of the series:
[this message] - John Smith @ 2015-09-04 00:04:20 UTC
` [PATCH 1/4] view: eliminate redundant [threaded|flat] link
` [PATCH 2/4] view: one line for thread subjects
` [PATCH 3/4] view: adjust spacing and indentation of index threads
` [PATCH 4/4] view: add missing newline to inline dump
|
|
This fixes a regression introduced in
commit 16ca6b7a57266fcb466ffff005bc1d644bad14c1
(view: avoid attempting to find "subject dummy")
|
|
Avoid wasting precious horizontal space by indenting children
excessively relative to the top-level parent.
|
|
We truncate subjects in the Xapian document anyways,
so lines should not be too long and it hopefully won't
throw off the vertical display.
|
|
We do not need to waste space with that link when
we have it conveniently placed where every message
is located.
|
|
They're unused, and they can have namespace conflicts if
there's multiple full messages in the thread view.
|
|
Spaces may be added when using header_str with Email::MIME->create,
so use the normal "header" parameter when setting Message-IDs
and References.
|
|
This is an internal Message-ID used by Mail::Thread, to group
messages with identical subjects but common parent. Don't
attempt to redirect users to external sites when we cannot
find it.
|
|
Oops, browsers normally render this fine, though.
|
|
This is a display subroutine so it should not be in our thread
monkey-patching package, but instead in the view package.
Hopefully one day in the future, Mail::Thread will be maintained
again and we'll no longer need PublicInbox::Thread at all.
|
|
This lets us merge topics with different subjects with a common parent
(common in "[PATCH 0/X]" threads). This also lets us avoid forking for
the HTML index page, too.
|
|
We do not want to get legacy URLs swallowed up by our workaround
for weird and wonky servers that attempt to unescape PATH_INFO
before the app sees it.
|
|
This is the correct Content-Type for Atom feeds, especially
since we updated to use ".atom" as the suffix.
|
|
Unfortunately, some HTTP servers will try to be clever
with %2F and escape it to '/', making life difficult for
us. Fortunately, not many Message-IDs have slashes in
them.
|
|
Provide a fallback for legacy SHA-1 messages, but do not
advertise shorter URLs anymore for data portability concerns.
This fixes a regression introduced in
commit 81a9c1b476987d845b340ab9013d26cf4487cb9a
("search: disable Message-ID compression in Xapian")
which ended up breaking thread-related endpoints for
large Message-IDs, as lookups on the SHA-1 message no longer
worked.
|
|
Since cross-posting is inevitable, we shall link to external
message archives for interopability.
|
|
We'll continue to compress long Message-IDs in URLs (which we know
about), but we will store entire Message-IDs in the Xapian database
to facilitate ease-of-lookups in external databases.
|
|
We'll be expanding our ghost message lookup facilities, so
it makes sense to generate links to them even if they are
currently unknown.
|