about summary refs log tree commit homepage
path: root/lib/PublicInbox/HTTPD.pm
DateCommit message (Collapse)
2023-10-25drop psgi_return, httpd/async and GetlineBody
Now that psgi_yield is used everywhere, the more complex psgi_return and it's helper bits can be removed. We'll also fix some outdated comments now that everything on psgi_return has switched to psgi_yield. GetlineResponse replaces GetlineBody and does a better job of isolating generic PSGI-only code.
2022-08-09daemon: use per-listener SIG{__WARN__} callbacks
This allows "-l $ADDRESS?err=/path/to/err.log to isolate normal warn() (and carp()) messages for a particular listen address to track down errors more easily.
2022-08-02daemon: support per-listener env, .psgi, out, err
This allows memory savings by allowing multiple, completely unrelated-PSGI apps to run within the same process as IMAP, NNTP, and POP3.
2022-08-02httpd: make internals slightly more generic
This brings the HTTP server closer to the IMAP/NNTP/POP3 implementations and eliminates package-wide globals in PublicInbox::HTTPD. The end goal is to be able to host completely different PSGI applications on different listen ports.
2022-05-05public-inbox-netd: a multi-protocol superserver
Since we'll be adding POP3 support as our 4th network protocol; asking admins to run yet another daemon on top of existing -httpd, -nntpd, -imapd is a maintenance burden and a waste of memory. The goal of public-inbox-netd is to be able to replace all existing read-only daemons with a single process to save memory and reduce administrative overhead; hopefully encouraging more users to self-host their own mirrors. It's barely-tested at the moment. Eventually, multiple PI_CONFIG and HOME directories will be supported, as are per-listener .psgi config files.
2021-08-08httpd: set psgi.url_scheme to 'https' for TLS listeners
For users using the native TLS functionality of -httpd (instead of using nginx + Plack::Middleware::ReverseProxy), psgi.url_scheme=http was wrong and would lead to improper redirects.
2021-06-24favor git(1) rather than libgit2 for ExtSearch
While both git and libgit2 take around 16 minutes to load 100K alternates there's already a proposed patch to make git faster: <https://lore.kernel.org/git/20210624005806.12079-1-e@80x24.org/> It's also easier to patch and install git locally since the git.git build system defaults to prefix=$HOME and dealing with dynamic linking with libgit2 is more difficult for end users relying on Inline::C. libgit2 remains in use for the non-ALL.git case, but maybe it's not necessary (libgit2 is significantly slower than git in Debian 10 due to SHA-1 collision checking).
2021-01-01update copyrights for 2021
Using "make update-copyrights" after setting GNULIB_PATH in my config.mak
2020-07-06www: update internal docs
We no longer favor getline+close for streaming PSGI responses when using public-inbox-httpd. We still support it for other PSGI servers, though.
2020-02-06treewide: run update-copyrights from gnulib for 2019
I didn't wait until September to do it, this year!
2020-01-06treewide: "require" + "use" cleanup and docs
There's a bunch of leftover "require" and "use" statements we no longer need and can get rid of, along with some excessive imports via "use". IO::Handle usage isn't always obvious, so add comments describing why a package loads it. Along the same lines, document the tmpdir support as the reason we depend on File::Temp 0.19, even though every Perl 5.10.1+ user has it. While we're at it, favor "use" over "require", since it it gives us extra compile-time checking.
2019-09-09run update-copyrights from gnulib for 2019
2019-07-08httpd: (cleanup) use reference instead of *glob
*glob notation isn't always necessary, and there's no need to disable 'once' warnings, this way.
2019-01-30httpd: a few comments about some fields we set
Removing 'psgix.input.buffered' could be a possibility in the future.
2019-01-10Merge commit 'mem'
* commit 'mem': view: more culling for search threads over: cull unneeded fields for get_thread searchmsg: remove unused fields for PSGI in Xapian results searchview: drop unused {seen} hashref searchmsg: remove Xapian::Document field searchmsg: get rid of termlist scanning for mid httpd: remove psgix.harakiri reference
2019-01-09doc: various overview-level module comments
Hopefully this helps people familiarize themselves with the source code.
2019-01-08httpd: remove psgix.harakiri reference
We don't need to set "psgix." extension fields for things we don't support. This saves 138 bytes per-client in $env as measured by Devel::Size::total_size
2018-02-07update copyrights for 2018
Using update-copyrights from gnulib While we're at it, use the SPDX identifier for AGPL-3.0+ to ease mechanical processing.
2016-12-22doc: various comments on async handling
Notes for future developers (myself included) since we can't assume people can read my mind.
2016-05-23git-http-backend: refactor to support cleanup
We will have clients dropping connections during long clone and fetch operations; so do not retain references holding backend processes once we detect a client has dropped.
2016-04-25split out NNTPD and HTTPD* modules
Hopefully this modularizes things a little and allows us to work on a combined super server to save RAM.