From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Flag: YES X-Spam-Level: *********** X-Spam-ASN: AS200651 185.100.84.0/23 X-Spam-Status: Yes, score=11.3 required=3.0 tests=BAYES_20, RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_BRBL_LASTEXT,RCVD_IN_MSPIKE_BL, RCVD_IN_MSPIKE_L5,RCVD_IN_PSBL,RCVD_IN_RP_RNBL,RCVD_IN_SBL_CSS,RCVD_IN_XBL, RDNS_NONE,SPF_FAIL,SPF_HELO_FAIL,URIBL_BLOCKED shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 X-Spam-Report: * 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. * See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block * for more information. * [URIs: yhbt.net] * 3.3 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS * [185.100.84.108 listed in zen.spamhaus.org] * 0.4 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL * 1.4 RCVD_IN_BRBL_LASTEXT RBL: No description available. * [185.100.84.108 listed in bb.barracudacentral.org] * 0.0 RCVD_IN_MSPIKE_L5 RBL: Very bad reputation (-5) * [185.100.84.108 listed in bl.mailspike.net] * 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL * [185.100.84.108 listed in psbl.surriel.com] * 1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net * [Blocked - see ] * 1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL, * https://senderscore.org/blacklistlookup/ * [185.100.84.108 listed in bl.score.senderscore.com] * 0.0 SPF_HELO_FAIL SPF: HELO does not match SPF record (fail) * [SPF failed: Please see http://www.openspf.org/Why?s=helo;id=80x24.org;ip=185.100.84.108;r=dcvr.yhbt.net] * 0.0 SPF_FAIL SPF: sender does not match SPF record (fail) * [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=e%4080x24.org;ip=185.100.84.108;r=dcvr.yhbt.net] * -0.0 BAYES_20 BODY: Bayes spam probability is 5 to 20% * [score: 0.1523] * 0.0 RCVD_IN_MSPIKE_BL Mailspike blacklisted * 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS Received: from 80x24.org (unknown [185.100.84.108]) by dcvr.yhbt.net (Postfix) with ESMTP id 3CB8A1FA7A for ; Mon, 16 May 2016 01:43:47 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH 0/7] proxy_pass cleanups Date: Mon, 16 May 2016 01:43:33 +0000 Message-Id: <20160516014340.8258-1-e@80x24.org> List-Id: A bunch of cleanups to hopefully make the proxy_pass-related code a little saner and easier-to-follow. I introduced at least one bug during this series which got fixed in 7/7. Extra sets of eyes to review would be greatly appreciated, thanks! And this is running live and serving critical information to readers of https://yhbt.net/ in all its glory! Once I'm reasonably satisfied with this; I'll continue work on making "proxy_buffering: false" work, so slow-client-capable upstreams can generate gigantic (hundreds of megabytes!) responses without filesystem overhead. But first, I think I should work on making those gigantic responses cheaper in terms of memory/CPU usage outside of yahns. This is git-http-backend for serving mega repos over smart HTTP, yahns is already great for dumb HTTP git clones. lib/yahns/proxy_http_response.rb | 236 +++++++++++++++------------------------ lib/yahns/proxy_pass.rb | 171 +--------------------------- lib/yahns/req_res.rb | 159 ++++++++++++++++++++++++++ 3 files changed, 252 insertions(+), 314 deletions(-) Eric Wong (7): proxy_pass: simplify writing request bodies upstream proxy_pass: hoist out proxy_res_headers method proxy_pass: simplify proxy_http_response proxy_pass: split out body and trailer reading in response proxy_pass: trim down proxy_response_finish, too proxy_pass: split out req_res into a separate file proxy_pass: fix resumes after complete buffering is unblocked