rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: rack-devel@googlegroups.com
Subject: Re: Why env.object_id is different in each middleware?
Date: Wed, 6 Jan 2010 00:47:41 +0100	[thread overview]
Message-ID: <201001060047.41311.ibc@aliax.net> (raw)
In-Reply-To: <f732822d1001051257w5b1e174bl6de748ed48c020e0@mail.gmail.com>

El Martes, 5 de Enero de 2010, Ryan Tomayko escribió:
> Or maybe this really is something the env could be useful for and I've
> just never run into a good case. Can anyone provide real examples of
> where it would be necessary?

My real case:

I want to use Clogger to log the authenticated user ($env["REMOTE_USER"]).

Clogger expects that it runs after an authentication middleware which adds 
such env entry. However in my case I need to decide the "remote_user" in the 
final Rack application so I need that changes done in env by the last Rack 
application are visible for previous middlewares (Clogger).

Perhaps env shouldn't be used for this purpose, but what else? adding such 
info in the response headers seem a hack to me, what about if I want to pass 
an object or a hash rather than a single string?


-- 
Iñaki Baz Castillo <ibc@aliax.net>

      reply	other threads:[~2010-01-05 23:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09 22:59 Why env.object_id is different in each middleware? Iñaki Baz Castillo
2009-12-09 23:15 ` Iñaki Baz Castillo
2010-01-04  0:50   ` Tim Carey-Smith
2010-01-04  0:58     ` Iñaki Baz Castillo
2010-01-04 19:44     ` Iñaki Baz Castillo
2010-01-05 20:57     ` Ryan Tomayko
2010-01-05 23:47       ` Iñaki Baz Castillo [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=201001060047.41311.ibc@aliax.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).