yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: yahns-public@yhbt.net
Subject: [PATCH 0/2] proxy_pass: fleshing out trailer support
Date: Tue,  7 Apr 2015 03:16:56 +0000	[thread overview]
Message-ID: <1428376618-13665-1-git-send-email-e@80x24.org> (raw)

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(-)

             reply	other threads:[~2015-04-07  3:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07  3:16 Eric Wong [this message]
2015-04-07  3:16 ` [PATCH 1/2] proxy_pass: preliminary support for passing trailers Eric Wong
2015-04-07  3:16 ` [PATCH 2/2] proxy_pass: send 1.0 requests to upstreams for 1.0 clients Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/yahns/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428376618-13665-1-git-send-email-e@80x24.org \
    --to=e@80x24.org \
    --cc=yahns-public@yhbt.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).