Date | Commit message (Collapse) |
|
Plack::Handler::Apache2 exists and seems to work very well.
|
|
webrick clears PATH otherwise, and we rely on git commands.
|
|
Users wanting to customize their installation should know
to about the usability of STDOUT for logging.
(and we still need manpages for -nntpd and -httpd)
|
|
Perl may complain about exit not being executed, but not die.
|
|
Oops :x
|
|
HTTP responses may be long-running or requests may be slow or
pipelined. Ensure we don't kill them off prematurely.
|
|
We can rely on timely auto-destruction based on reference
counting; reducing the chance of redundant close(2) calls
which may hit the wront FD.
We do care about certain close calls (e.g. writing to a buffered
IO handle) if we require error-checking for write-integrity. In
other cases, let things go out-of-scope so it can be freed
automatically after use.
|
|
While empty or "0" should never appear, this allows the
reviewer to think and know less about the context in which
this check is done.
|
|
No point in loading Data::Dumper if we do not use it
in the tests.
|
|
Not sure how, but this should've always been AGPL-3.0+ like
the rest of the code, not GPL-3.0+
|
|
It's been a while...
|
|
Not everybody will be running this behind a ReverseProxy;
but it's probably the likely configuration. Anyways,
warn about this and also about Deflater being missing.
|
|
This is necessary since we want to be able to do arbitrary redirects
via the popen interface. Oh well, we'll be a little slower for now
for users without vfork. vfork users will get all the performance
benefits.
|
|
Oops :x
|
|
This means we always load the PSGI server code early for
-httpd. This may make things less compatible with existing
PSGI/Plack apps, but we prioritize our httpd for the uses
of public-inbox itself, first.
And any existing PSGI/Plack app which wants to may adapt
themselves to being preload-friendly.
|
|
We must stash the error correctly when nesting evals, oops :x
|
|
This seems to match more closely with what is expected of Perl
packages based on how blib is used. Hopefully makes the top-level
source tree less cluttered and things easier-to-find.
|
|
This should reduce overhead of spawning git processes
from our long-running httpd and nntpd servers.
|
|
Under Linux, vfork maintains constant performance as
parent process size increases. fork needs to prepare pages
for copy-on-write, requiring a linear scan of the address
space.
|
|
No point in comparing an empty string; length() is only
potentially expensive on big strings.
|
|
ReverseProxy is the common way to run Perl applications,
so enable it by default and don't care too much about fake
requests because we don't handle any sensitive information
or rely on authentication (everything is read-only from
the WWW interface and will remain so).
|
|
Writing a read-only IMAP server isn't out-of-scope, either,
but I've never studiied the IMAP protocol, much, unlike HTTP/1.x
or even NNTP.
|
|
We want this to be usable as a generic httpd for other Free Software
projects, so do not force users to load our WWW code at
compile-time.
|
|
We want to preload as much as possible in -httpd when forking
to save memory via CoW.
|
|
Some linkifiers to create invalid HTTP links when it sees a
link intended for NNTP services. This means we may see links
to news.public-inbox.org/inbox.comp.mail.public-inbox.meta
point to "http://" on port 80 instead of 119. Try to
redirect users to http://public-inbox.org/meta/ in this case.
|
|
All URL generation in dynamic HTTP pages should be capable of
generating "https" or "http" URLs depending on the user's
preference.
|
|
This will allow us to more easily read and test later.
|
|
We cannot modify elements in any shared data strucutures
shared between requests. Oops!
|
|
We will be falling back and cascading to newsgroup lookups, later.
|
|
Danga::Socket will die on us if we hit the base implementations.
|
|
Even with output buffering disabled via IO::Handle::autoflush,
writes are not atomic unless it is a single argument passed to
"print". Multiple arguments to "print" will show up as multiple
calls to write(2) instead of a single, atomic writev(2).
|
|
git-http-backend may take a while, ensure we can process other
requests while waiting on it. We currently do this via
Danga::Socket in public-inbox-httpd; but avoid exposing this
internal implementation detail to the PSGI interface and
instead only expose a callback via: $env->{'pi-httpd.async'}
|
|
Designing for asynchronous, non-blocking operations makes
adapting for synchronous, blocking operation easy.
Going the other way around is not easy, so do it now and
allow us to be more easily adapted for non-blocking use
in the next commit...
|
|
This allows us to stream the output to the client without buffering
everything up-front. Next, we'll let Danga::Socket (or AE in the
future) wait for readability.
|
|
This allows users to avoid HTTPS -> HTTP downgrade warnings,
but we will also avoid encouraging them towards HTTPS, for now.
IMHO: the CA system gives a false sense of security,
TLS libraries (e.g. OpenSSL) can introduce new bugs and
problems (even to attack clients), and TLS libraries
also eats memory on cheap servers.
|
|
This allows multiple instances the WWW app from
running within the same process space
|
|
Relying on Plack::Handler::CGI is much easier for long-term
maintenance and development.
Nowadays, we even include our own httpd implementation to
facilitate easier deployment with PSGI/Plack.
|
|
Setting the "In-Reply-To:" header via mailto: links is not
well-supported and should probably not be encouraged unless
the client situation improves.
So instead, teach users more widely-supported ways of setting
the In-Reply-To: header to ensure proper threading of replies.
|
|
For future changes, this will allow us to more quickly notice
if we keep the heavy Email::MIME object around too long.
It has the side effect of avoiding extra method calls with
Email::MIME which forwards header calls to the header_obj.
|
|
Just in case my knowledge of chunking is wrong.
|
|
This is meant to provide an easy starting point for server admins.
It provides a basic HTTP server for admins unfamiliar with
configuring PSGI applications as well as being an identical
interface for management as our nntpd implementation.
This HTTP server may also be a generic Plack/PSGI server for
existing Plack/PSGI applications.
|
|
Avoid unintentionally switching protocols if the external site
we're linking to supports both HTTP and HTTPS.
We do not want to force HTTPS everywhere because potential
bugs and performance problems in the TLS stack may outweigh
the privacy benefits. Leave up to site authors and users
to decide whether they want HTTPS or plain old HTTP.
|
|
Not everybody is willing to install or run ssoma; but at least
document "git clone --mirror" usage to promote data distribution.
It's wasteful to clone without "--mirror", so we'll suggest that
to avoid wasting disk space and inodes.
|
|
Running behind a ReverseProxy is a popular deployment,
so document it for users.
|
|
All public-inbox instances shall be clone-able.
|
|
Normal browsers should understand relative path names.
Atom feeds may be hosted externally and seems to need
full URLs.
|
|
Reported-by: Jordi Bunster <jordi@bunster.org>
|
|
In an single-message thread with a ghost parent, we need to
go up level from the current Message-ID before appending the
parent message to us.
|
|
Dropping "[FOO]" prefixes for the purposes of summarization
is tricky and we end up with odd display behavior.
Just show Subject line changes as the writer intended
(with the exception of normalization to strip the "Re: ")
|
|
It seems we need to declare "alternate" and "text/html" at least
for feed readers.
|