From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs774917bkj; Thu, 13 Aug 2009 09:31:11 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.220.73.206 as permitted sender) client-ip=10.220.73.206; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.220.73.206 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.220.73.206]) by 10.220.73.206 with SMTP id r14mr1480146vcj.12.1250181069880 (num_hops = 1); Thu, 13 Aug 2009 09:31:09 -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-spf:authentication-results:received :dkim-signature:domainkey-signature:mime-version:received :in-reply-to:references:from:date:message-id:subject:to:content-type :reply-to:sender:precedence:x-google-loop:mailing-list:list-id :list-post:list-help:list-unsubscribe:x-beenthere-env:x-beenthere; bh=KLXPLS91BDfq4n+9PNqCqJf/rHL5CC7TB9s2SFCBWu0=; b=lOhGVjOgeAHQ/oeQIa2/mZmtBUuvd4GeDYay+6GTtwKLSt9FZKQIMM+8KEHDLFIj4G 4BiY1GTfjxLwiF6X6pX9Fm2En50qRyjKN8L8hnzZ53KM0xalTyXtmMUj9i88dIpRar3c gAiiPVk6o01ipEkiVpml8MGon/RN/fBuHFNms= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :dkim-signature:domainkey-signature:mime-version:in-reply-to :references:from:date:message-id:subject:to:content-type:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=5V6JMAERzzsab16lY6QgPFRAYZUGma/n/Jrs/xwlz13G2lK96xKUDOVJOsLPIuymgc 4LGCjamHqiF/w8bFSxLMicQgpypg/Cle+/BLwJjRU1TEFng60tzQIJVmuBgqZMCzggDi IACMNrhfn7Khf65MXNMrlPDB+mhfTVkSqIUO8= Received: by 10.220.73.206 with SMTP id r14mr228039vcj.12.1250181069512; Thu, 13 Aug 2009 09:31:09 -0700 (PDT) Received: by 10.230.16.89 with SMTP id n25gr1575vba.0; Thu, 13 Aug 2009 09:31:02 -0700 (PDT) X-Sender: wycats@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.220.85.206 with SMTP id p14mr137724vcl.5.1250181062019; Thu, 13 Aug 2009 09:31:02 -0700 (PDT) Return-Path: Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.146]) by gmr-mx.google.com with ESMTP id 22si35187vws.14.2009.08.13.09.31.00; Thu, 13 Aug 2009 09:31:01 -0700 (PDT) Received-SPF: pass (google.com: domain of wycats@gmail.com designates 74.125.92.146 as permitted sender) client-ip=74.125.92.146; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wycats@gmail.com designates 74.125.92.146 as permitted sender) smtp.mail=wycats@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by qw-out-1920.google.com with SMTP id 5so284614qwc.4 for ; Thu, 13 Aug 2009 09:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=8yJh5foDTrDyACGpKKGM7VC4P3T4ceAbRzxPdXJUmjo=; b=pFWvg6kqC1hZxFXUmF44kzcqofKeKTPRAGZ9Z88QgEHEfXMUrdiIisTgH+evmm0+Hd aP5Gl7r7a3PSnEy5ZBX8WIWdI9FrCz7vXF3MR76vJ8CJ3rI85U+ugUHw0wtWHSbdI9BJ 20S1ZbctVeFcYJhijZxvx/oAC2a/5bntf9UL0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=mWgrAyS4WnDFbw6DIyRuU+MbsKiYg9Gz1rAw1GcI4O58nrMe8OqtwiWPN/rRl67Vjl 9P0ycrOZH+slpQ8IL2gM/AA6pi9DxAaUj0ilK/HrsUZaQX2Z+O5lYW05HVj4GJat3GPn PlOKoU/8pHDF4efsk5MKEJBOq539B8HK92VDw= MIME-Version: 1.0 Received: by 10.224.78.22 with SMTP id i22mr436287qak.280.1250181058097; Thu, 13 Aug 2009 09:30:58 -0700 (PDT) In-Reply-To: <69a2885c0908130918t16ad43f5pe6d13086a4afb330@mail.gmail.com> References: <69a2885c0904290803j292d2c45j5a46d0e759b6272a@mail.gmail.com> <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> From: Yehuda Katz Date: Thu, 13 Aug 2009 09:30:38 -0700 Message-ID: <245fb4700908130930s19059450v59d0155509d287e9@mail.gmail.com> Subject: Re: Downsizing CommonLogger To: rack-devel@googlegroups.com Content-Type: multipart/alternative; boundary=00c09f9c981edf75c7047108753d 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 --00c09f9c981edf75c7047108753d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 On Thu, Aug 13, 2009 at 9:18 AM, Jeremy Kemper wrote: > > On Thu, Aug 13, 2009 at 5:14 AM, Christian > Neukirchen wrote: > > > > Jeremy Kemper writes: > > > >> CommonLogger's concern > >> is logging the request, not calculating content length edge cases > > > > The CLF includes the real response size, though. It should be correct > > if you want to do traffic analysis with the existing tools. > > There is no standard "real" size. Most log the size of the entity body > as represented by Content-Length. Some include HTTP header size. Few > actually record the number of bytes sent to the client (mog_logio for > apache does). > > jeremy > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --00c09f9c981edf75c7047108753d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm personally quite concerned about trying to figure out the content-l= ength 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 serve= r that sends the data to the client, where it can be done once and in C.
-- Yehuda

On Thu, Aug 13, = 2009 at 9:18 AM, Jeremy Kemper <jeremy@bitsweat.net> wrote:

On Thu, Aug 13, 2009 at 5:14 AM, Christian
Neukirchen<chneukirchen@gmail.= com> wrote:
>
> Jeremy Kemper <jeremy@bitswe= at.net> writes:
>
>> CommonLogger's concern
>> is logging the request, not calculating content length edge cases<= br> >
> The CLF includes the real response size, though. =A0It should be corre= ct
> if you want to do traffic analysis with the existing tools.

There is no standard "real" size. Most log the size of the = entity body
as represented by Content-Length. Some include HTTP header size. Few
actually record the number of bytes sent to the client (mog_logio for
apache does).

jeremy



--
Yehuda Katz
D= eveloper | Engine Yard
(ph) 718.877.1325
--00c09f9c981edf75c7047108753d--