This project is archived and is in readonly mode.

#2139 ✓wontfix
Rick DeNatale

Rails 2.3 Compatibility with Rack Spec

Reported by Rick DeNatale | March 5th, 2009 @ 07:25 PM | in 2.x

I notice that ActionController::Session::AbstractStore is using the environment keys 'rack.session' and 'rack.session.options' to allow middleware in the stack to access the rails session.

This seems to be disallowed by the Rack specification http://rack.rubyforge.org/doc/fi...

"In addition to this, the Rack environment must include these Rack-specific variables: rack.version rack.url_scheme rack.input rack.errors rack.multithread rack.multiprocess rack.run_once

The server or the application can store their own data in the environment, too. The keys must contain at least one dot, and should be prefixed uniquely. The prefix rack. is reserved for use with the Rack core distribution and must not be used otherwise."

Although Rack::Lint does not enforce the absence of keys prefixed by 'rack.' other than those listed, I think that's a bug in Lint since it includes that last paragraph in its comments.

Is it possible to get the rack specification changed to bless these two new environment variables in the rack namespace. If not, should Rails change to use something within the spec before 2.3 is officially released?

Comments and changes to this ticket

  • Mark Imbriaco

    Mark Imbriaco March 5th, 2009 @ 08:05 PM

    • Assigned user set to “josh”
  • josh

    josh March 6th, 2009 @ 12:41 AM

    • State changed from “new” to “wontfix”

    Yeah, we working on adding other conventions like rack.session to a list so people know what data type should be stored there. These won't be part of the main list since they are gear towards middleware and are not required.

    Don't worry, we are doing the right thing by supporting rack.session.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages