about summary refs log tree commit homepage
DateCommit message (Collapse)
2016-02-28examples: various Apache-related doc updates
Plack::Handler::Apache2 exists and seems to work very well.
2016-02-28examples/cgi-webrick.rb: set CGIPathEnv, update comments
webrick clears PATH otherwise, and we rely on git commands.
2016-02-28examples/: PSGI example updates
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)
2016-02-28spawnpp: die instead of exit on exec failure
Perl may complain about exit not being executed, but not die.
2016-02-28newswww: set Content-Type properly
Oops :x
2016-02-28http: support graceful shutdown like nntp
HTTP responses may be long-running or requests may be slow or pipelined. Ensure we don't kill them off prematurely.
2016-02-28reduce calls to close unless error checks are needed
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.
2016-02-28searchidx: use defined for checking EOF behavior
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.
2016-02-28t/: remove unnecessary Dumper use
No point in loading Data::Dumper if we do not use it in the tests.
2016-02-28searchmsg: update + fix license header
Not sure how, but this should've always been AGPL-3.0+ like the rest of the code, not GPL-3.0+
2016-02-28MANIFEST: update (generate via "git ls-files")
It's been a while...
2016-02-28httpd: allow running if ReverseProxy is missing
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.
2016-02-28spawn: disable popen optimization for non-vfork
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.
2016-02-28spawnpp: fix error message for stderr redirect failing
Oops :x
2016-02-27daemon: refresh before forking
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.
2016-02-27spawn: fail properly if Inline fails
We must stash the error correctly when nesting evals, oops :x
2016-02-27move executables to script/ directory
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.
2016-02-27git: use built-in spawn implementation for vfork
This should reduce overhead of spawning git processes from our long-running httpd and nntpd servers.
2016-02-27initial spawn implementation using vfork
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.
2016-02-27http: simplify offset calculation slightly
No point in comparing an empty string; length() is only potentially expensive on big strings.
2016-02-26psgi: enable ReverseProxy middleware by default
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).
2016-02-26daemon: update comment about usage in httpd
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.
2016-02-26httpd: avoid loading our WWW-specific code early
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.
2016-02-26www: add News* wrappers to preload
We want to preload as much as possible in -httpd when forking to save memory via CoW.
2016-02-26www: workaround for malformed NNTP links
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.
2016-02-26support protocol-relative URLs in publicinbox.$LISTNAME.url
All URL generation in dynamic HTTP pages should be capable of generating "https" or "http" URLs depending on the user's preference.
2016-02-26git-http-backend: extract input_to_file function
This will allow us to more easily read and test later.
2016-02-26extmsg: do not modify shared array via prurl
We cannot modify elements in any shared data strucutures shared between requests. Oops!
2016-02-26extmsg: allow returning 404 responses
We will be falling back and cascading to newsgroup lookups, later.
2016-02-25httpd: fill in missing Danga::Socket callbacks
Danga::Socket will die on us if we hit the base implementations.
2016-02-25git-http-backend: avoid multi-arg print statemtents
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).
2016-02-25git-http-backend: start async API for streaming
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'}
2016-02-25git-http-backend: start refactoring to use callback
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...
2016-02-25use pipe for git-http-backend output
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.
2016-02-25hval: implement common UI for protocol-relative URLs
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.
2016-02-25www: make interface more OO
This allows multiple instances the WWW app from running within the same process space
2016-02-25remove direct CGI.pm support
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.
2016-02-24www: support $MESSAGE_ID/R/ endpoint for replies
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.
2016-02-24view: capture header object early
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.
2016-02-23t/httpd-corner: test HTTP chunking with curl
Just in case my knowledge of chunking is wrong.
2016-02-23initial public-inbox-httpd implemenation
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.
2016-02-22extmsg: support "//" protocol-relative URLs
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.
2016-02-13www: document "git clone --mirror" usage
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.
2016-02-13examples/public-inbox.psgi: document ReverseProxy
Running behind a ReverseProxy is a popular deployment, so document it for users.
2016-02-13www: advertise clone-ability over http/https
All public-inbox instances shall be clone-able.
2016-02-13feed: favor relative URL to Atom feed in HTML
Normal browsers should understand relative path names. Atom feeds may be hosted externally and seems to need full URLs.
2016-02-12README: fix broken link to dc-dlvr-spam-flow
Reported-by: Jordi Bunster <jordi@bunster.org>
2016-02-08view: fix link to top-level ghost parent
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.
2016-02-08view: simplify topic handling based on subjects
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: ")
2016-02-08feed: declare alternate link to HTML interface
It seems we need to declare "alternate" and "text/html" at least for feed readers.