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 via email to