Date | Commit message (Collapse) |
|
Both the C and pure Perl implementions of `pi_fork_exec'
returns `-1' on error, not `undef'.
|
|
Some old emails don't have timezone offsets, since our
Date::Parse code path takes a liberal interpretation of dates,
fallback to using "+0000" as the timezone offset since it's
closer to the actual date of the message than whatever the
current date is.
Reported-by: Leah Neukirchen <leah@vuxu.org>
Link: https://public-inbox.org/meta/87h7zfemur.fsf@vuxu.org/
Fixes: ae80a3fdb53d7014 ("MsgTime.pm: Use strptime to compute the time zone")
|
|
Some strange "From:" lines will cause Email::Address::XS to
leave '<' (and presumably '>') in the address which
git-fast-import won't accept even if quoted. Workaround this
problem by deleting '<' and '>' the same way we delete them for
the ident name.
Reported-by: Leah Neukirchen <leah@vuxu.org>
Link: https://public-inbox.org/meta/87h7zfemur.fsf@vuxu.org/
|
|
IO::Compress is required for v2 inboxes and overview
indices, after all, but it is often pulled in by
other packages (HTTP::Message via Plack::Test).
|
|
This isn't anything new and has been a part of the design
since the beginning, but it may not be apparent to some
folks.
|
|
`%over' could be confused for the overview SQLite DB
instance, so call it `%override', instead. There's
also no need to write a loop to override a hash when
the language can do it for us.
|
|
Perhaps 1.4.0 will be a small release, after all (and also
smaller in terms of memory use :)
|
|
It only needs to return a boolean, since none of the current
callers care about the return value. Thus avoid a hash table
assignment and use of `$smsg->{mime}', here.
|
|
Import::remove is a documented interface, and the return
value of the V2Writable work-alike should try to be compatible
with what Import implements.
|
|
It was the only file in our tree which had CRLF line endings,
so make it consistent with the rest.
|
|
The only caller of `flush_diff' is `add_text_body', and that
already did CRLF conversion on the text part. The regexps in
SolverGit still need to preserve CR, however, since that
actually applies patches (instead of rendering them), and we
need to preserve CRLF patches for CRLF files.
|
|
Instead, we add CRLF conversion to the only remaining place
which needs it, ViewVCS. This save many redundant ops in in
many places.
The only other place where this mattered was in
View::add_text_body, but we already started doing CRLF
conversions when we added diff parsing and link generation for
ViewVCS. Otherwise, all other places we used this was for
header viewing and Email::MIME doesn't preserve CRLF in headers.
|
|
It shouldn't be hard to make this into a more generic
importer not specific to vger lists.
|
|
PublicInbox::InboxWritable takes care of those imports.
|
|
We never lookup `$ctx->{-obfuscate}' anywhere, as the
correct key is `$ctx->{-obfs_ibx}' since some of the
address obfuscation stuff is inbox-specific.
Note: some of the obfuscation stuff still needs tests,
but it's low-priority at the moment since I don't think
it's a good feature after all.
|
|
Can't code without data structures, and we emphasize
data over code just about everywhere.
|
|
Since v2 inboxes can be made of several git repositories,
consistently call them "inboxes", instead.
|
|
Since v2 inboxes contain multiple git repositories, avoid the
use of the word "repository" when referring to inboxes as a
whole in most places.
|
|
We don't need to hold onto the Email::MIME object across
multiple WwwResponse->getline calls, instead we can stuff
the rendered HTML of the first (and hopefully only) message
of the buffer into ctx->{-html_tip}.
|
|
The blob regeneration (solving) part has been stable and
performant for over a year with no problems, even with web
crawlers constantly hitting it without needing rate limits.
All the other stuff is open to bikeshedding (as long as
my crappy hardware supports it :P)
|
|
Long URLs waste bandwidth and redundant query parameters
make caching more difficult and expensive.
Fixes: ddec19694cbf0e1d ("viewdiff: rewrite and simplify")
|
|
The object-oriented Hval API turned out to be less useful and
more clunky than I envisioned years ago, so get rid of it.
We'll no longer strip trailing whitespace from From: headers in
the HTML display, but I doubt anybody cares.
|
|
We need to escape ampersands (and some other characters for href
attributes), so introduce a `mid_href' sub to do just that.
'<', '>' and '"' were always escaped, so there's no risk of tag
or attribute injection, but creative Message-IDs could cause
confusion for some parsers and generate invalid URLs.
Start getting rid of the bloated, over-engineered OO Hval API
while we're at it, I only noticed this bug because I started
killing off Hval->new* callers.
|
|
No need to use the over-engineered Hval OO API when the subject
is already normalized and there's no trailing spaces because of
normalization.
|
|
We already pre-populate the hashref when loading $smsg
(PublicInbox::SearchMsg) objects out of over.sqlite3 or Xapian,
so making expensive method calls isn't necessary in those cases.
We only need to use the method calls when SQLite or Xapian are
not available or are being populated (such as during indexing).
|
|
Avoid needlessly normalizing the subject when dumping, since
it's pushed into the @$topic array during accumulation in
normalized form.
We can also safely treat $smsg as a hashref and avoid
calling "->ds" as a method since we know we've got that
loaded via Over||Search and won't have to use Email::MIME
header lookup methods.
|
|
We use `$top' in other places, so name it to `$top_subj'
consistently for `$subj' and `$prev_subj' comparisons down
the function.
|
|
While multi-Subject messages are unfortunate, try not to
generate confusing/invalid HTML with multiple elements
having the same HTML id attribute.
|
|
No point in passing something on stack only to stash it
into the $ctx which holds most other parameters used for
rendering the HTML.
|
|
A long overdue test for behavior established in 2016.
Fixes: 1b28cc7f00a866cb ("view: try assuming UTF-8 for bogus charsets")
|
|
Bigger changes coming :>
|
|
|
|
SearchIdx always requires DBD::SQLite, so only require it
after we've passed `require_mods(qw(DBD::SQLite))'.
|
|
We don't want to blow up users storage too badly when converting
v1 to v2 or break because they don't have Xapian bindings installed.
|
|
|
|
NNTP TLS and COMPRESS support and cgit spawning from
the WWW interface were implemented last year.
Given the lack of syscall number stability guarantee on the
OpenBSD and FreeBSD, I don't think supporting a pure-Perl kevent
is feasible. Inline::C may still be an option since IO::KQueue
is abandoned, though, as it is for some Linux-only syscalls and
maybe some POSIX ones not covered by POSIX.pm.
|
|
It was missing "(C)", so gnulib update-copyright missed it.
|
|
XML::Feed pulls in a lot of dependencies, some of which XS.
That makes testing with blead or any non-OS-supplied Perl
installations more time consuming and more difficult because
of the need to have development headers and libraries for
libexpat1 or libxml2.
Performance from libexpat1 or libxml2 for our small tests cases
isn't relevant, either, and the pure Perl XML::TreePP seems up
to the task. It's also available in CentOS 7.x, FreeBSD 11.x,
and Debian, at least.
|
|
The x32 ABI allows users to take advantage of the extra
registers on x86-64 without the bloat of 64-bit pointers and
longs.
This ought to be significant since Perl was designed when 32-bit
was prevalent; and the common structs for ops, hashes, scalars,
and arrays use longs (SSize_t/Size_t) for things which should
never need 64-bits when processing emails.
Debian's x32 port seems to work quite nicely under a chroot
on an amd64 Linux system. All tests pass under x32, now.
|
|
I didn't wait until September to do it, this year!
|
|
Oops :x
|
|
The git-filter-branch(1) manpage itself recommends git-filter-repo,
nowadays due to performance and safety problems.
|
|
This can be more convenient for people browsing HTML docs
remotely or locally.
|
|
There's no need to keep Xapian manpage renderings in a separate
subdirectory, after all.
Eliminating this difference between the local FS and URL path
will allow relative URLs to the Xapian manpages in our local
HTML documentation to work smoothly, since there was never any
".x/" path component for files served from public-inbox.org
|
|
Maybe this can make it easier for new and potential
users to understand what's going on.
|
|
It can cause unpredictable behavior and also slow things down.
Followup-to: e4d3be19612b2082 ("t: localize the PI_CONFIG env")
|
|
It's likely a user will be low on space after running --reindex,
so recommend the use of public-inbox-compact afterwards.
And add a few more notes about using public-inbox-compact to
clarify it's for inboxes-only (and not any old Xapian DBs) that
using xapian-compact(1) directly is error-prone and likely to
break things.
|
|
No need to call ref() and do a string comparison. Add some
extra tests using the {ReadOnly} attribute in DBI.pm.
|
|
It's an old function which only gets called by inboxes w/o
SQLite indices.
|
|
We can use "//=" from Perl 5.10 to simplify the logic for these
methods. The use of chomp() in ->cloneurl was also unnecessary
since split(/\s+/s,...) already removes newlines.
|