From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs26635wff; Sat, 5 Dec 2009 16:55:53 -0800 (PST) Received: from mr.google.com ([10.115.67.15]) by 10.115.67.15 with SMTP id u15mr2641846wak.15.1260060953010 (num_hops = 1); Sat, 05 Dec 2009 16:55:53 -0800 (PST) Received: by 10.115.67.15 with SMTP id u15mr374976wak.15.1260060951474; Sat, 05 Dec 2009 16:55:51 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.114.248.2 with SMTP id v2ls112890wah.2.p; Sat, 05 Dec 2009 16:55:49 -0800 (PST) Received: by 10.114.5.28 with SMTP id 28mr979056wae.5.1260060949262; Sat, 05 Dec 2009 16:55:49 -0800 (PST) Received: by 10.114.5.28 with SMTP id 28mr979055wae.5.1260060949243; Sat, 05 Dec 2009 16:55:49 -0800 (PST) Return-Path: Received: from mail-ew0-f225.google.com (mail-ew0-f225.google.com [209.85.219.225]) by gmr-mx.google.com with ESMTP id 1si443246pxi.1.2009.12.05.16.55.48; Sat, 05 Dec 2009 16:55:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.219.225 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) client-ip=209.85.219.225; Received: by ewy25 with SMTP id 25so1971987ewy.5 for ; Sat, 05 Dec 2009 16:55:48 -0800 (PST) Received: by 10.213.0.196 with SMTP id 4mr5152478ebc.41.1260060947855; Sat, 05 Dec 2009 16:55:47 -0800 (PST) Return-Path: Received: from ibc-laptop.localnet ([212.230.46.89]) by mx.google.com with ESMTPS id 15sm2639535ewy.12.2009.12.05.16.55.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Dec 2009 16:55:47 -0800 (PST) From: =?utf-8?q?I=C3=B1aki_Baz_Castillo?= To: rack-devel@googlegroups.com Subject: Re: Why Thin handler uses "Chunked" Trasfer-Encoding? Date: Sun, 6 Dec 2009 01:55:44 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.28-16-generic; KDE/4.3.2; x86_64; ; ) References: <200912060140.13051.ibc@aliax.net> In-Reply-To: MIME-Version: 1.0 Message-Id: <200912060155.44767.ibc@aliax.net> X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.219.225 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) smtp.mail=ibc@aliax.net Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/84ddfaed60efd056 X-Message-Url: http://groups.google.com/group/rack-devel/msg/2922fc3790e8cebc List-Unsubscribe: , List-Subscribe: , Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable El Domingo, 6 de Diciembre de 2009, Ryan Tomayko escribi=C3=B3: > On Sat, Dec 5, 2009 at 4:40 PM, I=C3=B1aki Baz Castillo w= rote: > > 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=3D{}) > > app =3D Rack::Chunked.new(Rack::ContentLength.new(app)) > > server =3D ::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"? >=20 > 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. =2D-=20 I=C3=B1aki Baz Castillo