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] revenge of the body-less responses
Date: Wed, 14 Dec 2016 06:59:50 +0000	[thread overview]
Message-ID: <20161214065952.28950-1-e@80x24.org> (raw)

It's wrong to set "Transfer-Encoding: chunked" on any response
without an entity body.  This confused curl -T- when I triggered
a rare 204 response...  Fortunately, yahns is not used in a
capacity where it's failure would start World War III.

Eric Wong (2):
      response: do not set chunked header on bodyless responses
      proxy_pass: do not chunk on bodyless upstream responses

 lib/yahns/http_response.rb       |  4 ++--
 lib/yahns/proxy_http_response.rb |  2 +-
 test/test_auto_chunk.rb          | 22 +++++++++++++++++++++-
 test/test_proxy_pass.rb          | 33 +++++++++++++++++++++++++++++++++
 4 files changed, 57 insertions(+), 4 deletions(-)

             reply	other threads:[~2016-12-14  6:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14  6:59 Eric Wong [this message]
2016-12-14  6:59 ` [PATCH 1/2] response: do not set chunked header on bodyless responses Eric Wong
2016-12-14  6:59 ` [PATCH 2/2] proxy_pass: do not chunk on bodyless upstream responses 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=20161214065952.28950-1-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).