From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS24940 78.46.0.0/15 X-Spam-Status: No, score=-2.2 required=3.0 tests=AWL,BAYES_00,RCVD_IN_XBL shortcircuit=no autolearn=no version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from 80x24.org (tor-exit1.arbitrary.ch [78.46.51.124]) by dcvr.yhbt.net (Postfix) with ESMTP id 130BE1F452 for ; Tue, 7 Apr 2015 03:17:04 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH 0/2] proxy_pass: fleshing out trailer support Date: Tue, 7 Apr 2015 03:16:56 +0000 Message-Id: <1428376618-13665-1-git-send-email-e@80x24.org> List-Id: Unfortunately, we need to support response trailers sent from upstreams to our HTTP/1.1 clients, as trailers are a(n obscure) part of HTTP/1.1. Then, we must also prevent trailers from being sent to HTTP/1.0 clients, as HTTP/1.0 clients do not support reading trailers (or chunked encoding, a prerequisite of trailers). The only way to send trailers to HTTP/1.0 clients is to send them as headers, but this is highly innefficient, especially for fast clients. So for HTTP/1.0 clients, we shall forward HTTP/1.0 requests to the backend which should prevent trailers from being sent at all. Eric Wong (2): proxy_pass: preliminary support for passing trailers proxy_pass: send 1.0 requests to upstreams for 1.0 clients lib/yahns/proxy_http_response.rb | 102 +++++++++++++++++++++------------------ lib/yahns/proxy_pass.rb | 9 +++- test/test_proxy_pass.rb | 84 +++++++++++++++++++++++++++++--- 3 files changed, 141 insertions(+), 54 deletions(-)