rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: rack-devel@googlegroups.com
Subject: Re: Downsizing CommonLogger
Date: Thu, 13 Aug 2009 20:33:20 -0700	[thread overview]
Message-ID: <20090814033320.GA14625@dcvr.yhbt.net> (raw)
In-Reply-To: <245fb4700908130930s19059450v59d0155509d287e9@mail.gmail.com>


Yehuda Katz <wycats@gmail.com> 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

      parent reply	other threads:[~2009-08-14  3:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-29 15:03 Downsizing CommonLogger Jeremy Kemper
2009-04-29 15:21 ` Michael Fellinger
2009-05-14  1:52   ` Jeremy Kemper
2009-05-14  5:14     ` Matt Todd
2009-05-14 14:28       ` Joshua Peek
2009-05-16  8:58         ` Christian Neukirchen
2009-08-12  1:14           ` Eric Wong
2009-08-12  2:38             ` Eric Wong
2009-08-12 21:56               ` Jeremy Kemper
2009-08-13  5:44                 ` Eric Wong
2009-08-13 10:14                 ` Christian Neukirchen
2009-08-13 16:18                   ` Jeremy Kemper
2009-08-13 16:26                     ` Jeremy Kemper
2009-08-13 16:30                     ` Yehuda Katz
2009-08-13 16:33                       ` Brian Lopez
2009-08-13 16:36                         ` Jeremy Kemper
2009-08-13 18:43                         ` Scytrin dai Kinthra
2009-08-14  3:33                       ` Eric Wong [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=20090814033320.GA14625@dcvr.yhbt.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).