Date | Commit message (Collapse) |
|
This is necessary for showing "found $OID in $CODEREPO_URL"
in solver-generated pages ($INBOX_URL/$OID/s/).
|
|
We can't completely instantiate our cgit wrapper without knowing
knowing cgit locations for serving static content.
Fixes: a5968dc059f655a ("config: lazy-load coderepos, support extindex")
|
|
Using "make update-copyrights" after setting GNULIB_PATH in my
config.mak
|
|
{pi_config} may be confused with the documented `PI_CONFIG'
environment variable, and we'll favor vowel-removal to be
consistent with our usage of object references.
The `pi_' prefix may stay in some places, for now; since a
separate namespace may come into this codebase for local/private
client-tooling.
For InboxIdle, we'll also remove an invalid comment about
holding a reference to the PublicInbox::Config object, too.
|
|
"*foo" is ambiguous in that it may refer to a bareword file handle;
so we'll use it where we can without triggering warnings.
PublicInbox::TestCommon::run_script_exit required dropping the
prototype, however. We'll also future-proof by dropping "use
warnings" in Cgit.pm and use the less-ambiguous "//=" in Inbox.pm
while we're in the area.
|
|
I didn't wait until September to do it, this year!
|
|
Unlike PublicInbox::GitHTTPBackend::git_parse_hdr,
cgit_parse_hdr does nothing interesting besides calling
parse_cgi_headers. So just make a reference to
PublicInbox::GitHTTPBackend::parse_cgi_headers and call it.
|
|
It's now possible to use WwwStatic as a standalone PSGI
app to serve static files and recreate the award-winning
web design of https://public-inbox.org/ :>
|
|
Remove redundant "r" functions for generating short error
responses. These responses will no longer be cached by clients,
which is probably a good thing since most errors ought to be
transient, anyways. This also fixes error responses for our
cgit wrapper when static files are missing.
|
|
AFAIK this doesn't do anything for Perl internally since
PublicInbox::Git doesn't "use fields", but it makes it easier for
humans readers to follow and ensure we're not passing unblessed
or non-ref scalars to PublicInbox::GitHTTPBackend::serve.
|
|
Another place where we can replace anonymous subs with named
subs by passing a user-supplied arg.
|
|
Make it easier to share code between our GitHTTPBackend and Cgit
packages, for now, and possibly other packages in the future.
We can avoid inline_object and anonymous subs at the same
time, reducing per-request memory overhead.
|
|
Callers can supply an arg to parse_hdr, now, eliminating the
need for closures to capture local variables.
|
|
Document `publicinbox.cgitdata' config directive, but allow it
to be unspecified and/or missing for installations which do not
wish to serve static data at all.
For users installing cgit from source to their home directory,
we can usually infer the cgit data path based on the cgit.cgi
binary path, even.
|
|
We can reduce the configuration needed to run cgit by reusing
the static file handling logic of the dumb git HTTP protocol.
I hate logos and icons, so don't expect public-inbox.org or
80x24.org to ever have those to waste users' bandwidth with :P
But I expect other users to find this useful.
|
|
I mainly need this to enforce RLIMIT_CPU (and RLIMIT_CORE)
when requests come which generate giant, unrealistic diffs.
Per-coderepo limiters may be added in the future. But for now,
I need to prevent cgit from monopolizing resources on my dinky
server.
|
|
We depend on git-http-backend for smart HTTP clone support,
however; since cgit does not support smart clones natively.
WWW.pm will be able to cascade down to this as a 404 handler in
the future.
|