From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs802527bkj; Thu, 13 Aug 2009 20:33:42 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.140.161.7 as permitted sender) client-ip=10.140.161.7; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.140.161.7 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.140.161.7]) by 10.140.161.7 with SMTP id j7mr890239rve.12.1250220819765 (num_hops = 1); Thu, 13 Aug 2009 20:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received:received-spf:authentication-results :received:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; bh=dgG0+dXPTtjT8dU7HLA4ycEjbG5lAcRLw/enmwqdasY=; b=nLbRB7WqO0vCJRc+c2squcprenRWA+LRum4EBUzUjvwZCMWoVqJAm5u+ZKPLoOjnZU gb6T4j39Bxb6m9/TSqu9v6/W0LZfTJIVFXRZgtmPr/lG6P5Ctne3KM/KZg8m0XYdVshq ho9Yb10QCgDEP1XXBywWNFy+XrXg1mP3aUCLY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:date :from:to:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=4kgSDhXN2cq2fekGx16lEusTYFqLem1AeUz7qW2I6siHDnjXlnvZWEzPCgRx5DAFxh mouRrmQaCTvfctfqvqA0JzZBC9LxqssWtr8vhNSJTokVgkEAaF+MpxGZPdodxIYhQ/0g mteA2arsdakfNd9LElrGlyIRr3xBwaUt9qhs4= Received: by 10.140.161.7 with SMTP id j7mr147936rve.12.1250220819431; Thu, 13 Aug 2009 20:33:39 -0700 (PDT) Received: by 10.106.10.2 with SMTP id 2gr1592prj.0; Thu, 13 Aug 2009 20:33:24 -0700 (PDT) X-Sender: normalperson@yhbt.net X-Apparently-To: rack-devel@googlegroups.com Received: by 10.142.194.1 with SMTP id r1mr458420wff.29.1250220803476; Thu, 13 Aug 2009 20:33:23 -0700 (PDT) Received: by 10.142.194.1 with SMTP id r1mr458419wff.29.1250220803454; Thu, 13 Aug 2009 20:33:23 -0700 (PDT) Return-Path: Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by gmr-mx.google.com with ESMTP id 20si94287pzk.6.2009.08.13.20.33.23; Thu, 13 Aug 2009 20:33:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) client-ip=64.71.152.64; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) smtp.mail=normalperson@yhbt.net Received: from localhost (user-118bg0q.cable.mindspring.com [66.133.192.26]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPSA id 1B0861F7E2; Fri, 14 Aug 2009 03:33:22 +0000 (UTC) Date: Thu, 13 Aug 2009 20:33:20 -0700 From: Eric Wong To: rack-devel@googlegroups.com Subject: Re: Downsizing CommonLogger Message-ID: <20090814033320.GA14625@dcvr.yhbt.net> References: <69a2885c0905131852h2ee62731o72337bec5490742e@mail.gmail.com> <2a8d4a710905132214s1cb24b4brea19d6f684be20c7@mail.gmail.com> <1c5622660905140728i3c162e1erf2e3058f79c80357@mail.gmail.com> <20090812011427.GA4737@dcvr.yhbt.net> <20090812023813.GA5916@dcvr.yhbt.net> <69a2885c0908121456w41348d4cjff273bbbed958fe3@mail.gmail.com> <69a2885c0908130918t16ad43f5pe6d13086a4afb330@mail.gmail.com> <245fb4700908130930s19059450v59d0155509d287e9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <245fb4700908130930s19059450v59d0155509d287e9@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com Yehuda Katz wrote: > I'm personally quite concerned about trying to figure out the content-length > in any Rack middleware. It's expensive to do in pure-ruby, and a later > middleware can mess with the size anyway and be forced to recalculate. I > think the appropriate place for this calculation is in the actual server > that sends the data to the client, where it can be done once and in C. > -- Yehuda If called in the correct place, the stock ContentLength middleware looks fine to me, and still easier/faster for clients (especially caches) to handle. That said, I consider correct ordering of the middleware stack to be a requirement anyways. Of course, chunked transfers (if they're generated on the fly) are impossible to calculate until the response is finished writing... I'd also rather not have my logs bound by whatever server-of-the-day I happen to be using. -- Eric Wong