From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: rack-devel@googlegroups.com
Subject: Re: Why Thin handler uses "Chunked" Trasfer-Encoding?
Date: Sun, 6 Dec 2009 01:55:44 +0100 [thread overview]
Message-ID: <200912060155.44767.ibc@aliax.net> (raw)
In-Reply-To: <f732822d0912051650l175b0b07hf16e75e89b24dd08@mail.gmail.com>
El Domingo, 6 de Diciembre de 2009, Ryan Tomayko escribió:
> On Sat, Dec 5, 2009 at 4:40 PM, Iñaki Baz Castillo <ibc@aliax.net> wrote:
> > Hi, Thin adapter looks like:
> >
> > -------------------------------------
> > require "thin"
> > require "rack/content_length"
> > require "rack/chunked"
> >
> > module Rack
> > module Handler
> > class Thin
> > def self.run(app, options={})
> > app = Rack::Chunked.new(Rack::ContentLength.new(app))
> > server = ::Thin::Server.new(options[:Host] || '0.0.0.0',
> > options[:Port] || 8080,
> > app)
> > yield server if block_given?
> > server.start
> > end
> > end
> > end
> > end
> > -----------------------------
> >
> > Why to force "Chunked"?
>
> That only applies chunked encoding if no Content-Length response
> header exists at that point in the middleware chain. I believe all
> Rack adapters that don't support chunked encoding internally follow
> the same pattern.
Thanks for the explanation.
--
Iñaki Baz Castillo <ibc@aliax.net>
prev parent reply other threads:[~2009-12-06 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 0:40 Why Thin handler uses "Chunked" Trasfer-Encoding? Iñaki Baz Castillo
2009-12-06 0:50 ` Ryan Tomayko
2009-12-06 0:55 ` Iñaki Baz Castillo [this message]
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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200912060155.44767.ibc@aliax.net \
--to=rack-devel@googlegroups.com \
/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.
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).