From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs775046bkj; Thu, 13 Aug 2009 09:33:58 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.143.26.42 as permitted sender) client-ip=10.143.26.42; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.143.26.42 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.143.26.42]) by 10.143.26.42 with SMTP id d42mr324799wfj.9.1250181237659 (num_hops = 1); Thu, 13 Aug 2009 09:33:57 -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:received:received:message-id :from:to:in-reply-to:content-type:mime-version:subject:date :references:x-mailer:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; bh=sT8oBEtRnnYIAHnJtt4cYhjtLU7u4wqNifHc9B8KkuI=; b=qNmq5d8UaEwSRKEWfACX36AgqWghv133ARn/eZ0TwWZYWtvKHlvnUZDXEry50EiRM4 qbCNqcgxHBoILyuLhAmAcERIRlzVubXFbvFSypn4lekvuhvxjKC6HT60nP+86VohgVyZ 8yS2e9RHkX8OYiaSUh4iwP2Wm2KiKOHZlNlE8= 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:message-id:from:to:in-reply-to :content-type:mime-version:subject:date:references:x-mailer:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=JsDt1OLr8/843yZST52+LEODccXi7+DnkxJ1xGdb4w9n8NFtX3EdKKyiQYq2eJZb8z 16m6x1cF3/o2kSiQlWddbr1CGZ60yD5UTucgqanPbmq+6Xqk0AqMhzWfZHWxL2qn3ykf UC6xHjcmtUUApPMDae0hz20Iz8f1T/Nk8+fRU= Received: by 10.143.26.42 with SMTP id d42mr54944wfj.9.1250181237322; Thu, 13 Aug 2009 09:33:57 -0700 (PDT) Received: by 10.106.252.29 with SMTP id z29gr1576prh.0; Thu, 13 Aug 2009 09:33:57 -0700 (PDT) X-Sender: seniorlopez@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.142.225.11 with SMTP id x11mr311132wfg.8.1250181234901; Thu, 13 Aug 2009 09:33:54 -0700 (PDT) Return-Path: Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.251]) by gmr-mx.google.com with ESMTP id 24si46486pzk.13.2009.08.13.09.33.53; Thu, 13 Aug 2009 09:33:53 -0700 (PDT) Received-SPF: pass (google.com: domain of seniorlopez@gmail.com designates 209.85.198.251 as permitted sender) client-ip=209.85.198.251; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of seniorlopez@gmail.com designates 209.85.198.251 as permitted sender) smtp.mail=seniorlopez@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by rv-out-0708.google.com with SMTP id c5so1500956rvf.2 for ; Thu, 13 Aug 2009 09:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:mime-version:subject:date:references :x-mailer; bh=TvO52DNp/XYqdj5zS+nFILp4oQI1H53Zt+AJ3qikbws=; b=vfMe5ekrFL8t4Mwo+y/rlkjRhe31mr0wwuhXV8IIWiW/sTLqgUGOJ0vKbpHrnfG3t8 RxaM019DFFjfOA82lctiZyme2EJykuCyJJDWQth044nikuKe7V6Fl6Jc0Na0J3SdqDOs qp427bCF1em1KCSfOT35eCfUKo/1g3kBVayTM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; b=RsLW1zelJbrZ14wTdSigdw4h5J95j2Lil1W/BLUwqkkL9AkG2rrQF1ufMZcvWBtKVf ju9PbV/7qhXHOLhkaNxmATwHBhUTh/PF4KjEmkNM96/EYkMbqkPEGw6n7KM7XEFG1S20 hr537vVt5TYzbP0RGWENENLAQwMAxmoOOgFO4= Received: by 10.140.128.1 with SMTP id a1mr635358rvd.227.1250181233783; Thu, 13 Aug 2009 09:33:53 -0700 (PDT) Return-Path: Received: from ?192.168.250.210? (dsl017-044-002.sfo4.dsl.speakeasy.net [69.17.44.2]) by mx.google.com with ESMTPS id b39sm712108rvf.8.2009.08.13.09.33.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Aug 2009 09:33:53 -0700 (PDT) Message-Id: <52E130C2-1B1F-4C0D-9724-D99AD5F8491B@gmail.com> From: Brian Lopez To: rack-devel@googlegroups.com In-Reply-To: <245fb4700908130930s19059450v59d0155509d287e9@mail.gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-8--856393048 Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Downsizing CommonLogger Date: Thu, 13 Aug 2009 09:33:50 -0700 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> <245fb4700908130930s19059450v59d0155509d287e9@mail.gmail.com> X-Mailer: Apple Mail (2.936) 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 --Apple-Mail-8--856393048 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Agreed. -Brian On Aug 13, 2009, at 9:30 AM, 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 > > 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 --Apple-Mail-8--856393048 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
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 <jeremy@bitsweat.net> = wrote:

= On Thu, Aug 13, 2009 at 5:14 AM, Christian
Neukirchen<chneukirchen@gmail.com> = wrote:
>
> Jeremy Kemper <jeremy@bitsweat.net> = 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

= --Apple-Mail-8--856393048--