unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Do we let Nginx to handle response Transfer-Encoding?
Date: Sun, 27 Dec 2009 19:17:00 -0800	[thread overview]
Message-ID: <20091228031700.GB4349@dcvr.yhbt.net> (raw)
In-Reply-To: <200912272058.33744.ibc@aliax.net>

Iñaki Baz Castillo <ibc@aliax.net> wrote:
> Hi, I've checked that in case my Rack application (under Unicorn) doesn't set 
> "Content-Lentgh" neither "Transfer-Encoding", then Nginx automatically adds 
> "Transfer-Encoding: chunked" to the response (and edits the body properly to 
> be in chunked format).
> 
> However Unicorn is sending a response with body but without "Content-Lentgh" 
> or "Transfer-Encoding", so IMHO it's incorrect according to RFC 2616.
> 
> So, should my Rack application handle this stuff? or is it better if I let 
> Nginx "fixing" it for me?

Just load the Rack::ContentLength middleware, if you're building a Rack
app from scratch.  Some frameworks already handle Content-Length for
you.

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


  reply	other threads:[~2009-12-28  3:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-27 19:58 Do we let Nginx to handle response Transfer-Encoding? Iñaki Baz Castillo
2009-12-28  3:17 ` Eric Wong [this message]
2009-12-28 10:23   ` Iñaki Baz Castillo

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

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

  git send-email \
    --in-reply-to=20091228031700.GB4349@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://yhbt.net/unicorn.git/

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