From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4F08A1F5A1 for ; Fri, 24 Jan 2020 09:43:52 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/4] -httpd static file improvements Date: Fri, 24 Jan 2020 09:43:48 +0000 Message-Id: <20200124094352.19437-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Serving large static files to slow clients could lead to public-inbox-httpd buffering data already in static files again into a temporary file. This was inefficient, and solving it in a generic way could actually break other PSGI servers since their sendfile optimizations don't handle 206 (partial content) responses correctly. So we make minor changes to the way PublicInbox::DS handles write buffers and inject static files, offsets, and length limits directly into the {wbuf} queue. Eric Wong (4): http: eliminate short-lived cyclic ref for psgix.io wwwstatic: offload error handling to PSGI server ds: tmpio: store offsets per-buffer wwwstatic: wire up buffer bypass for -httpd lib/PublicInbox/DS.pm | 36 ++++++++++---------- lib/PublicInbox/HTTP.pm | 7 ++-- lib/PublicInbox/WwwStatic.pm | 65 +++++++++++++++++++++--------------- 3 files changed, 61 insertions(+), 47 deletions(-)