about summary refs log tree commit homepage
path: root/lib/PublicInbox/GitHTTPBackend.pm
DateCommit message (Collapse)
2016-02-26git-http-backend: extract input_to_file function
This will allow us to more easily read and test later.
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-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-07support smart HTTP cloning
This requires POST and (small file) upload support from the PSGI/Plack web server. CGI.pm is currently not supported with this feature. We'll serve everything git can handle by default for performance in the general case. To avoid introducing cognitive overhead for sysadmins managing existing HTTP backends, we do not introduce new configuration directives. Thus, setting http.uploadpack=false in the relevant git config file for each public-inbox (ssoma) git repo will disable smart HTTP for CPU/memory-constrained systems. Technically we could support http.receivepack to allow posting messages to a public-inbox over HTTP(S), but that breaks the public-inbox model of encouraging users to Cc: everyone. Again, we encourage users to Cc: everyone to reduce the chance of a public-inbox becoming a centralized point of failure/censorship.