Dear fellows,

I have a subject about handling environmental variables on FastCGI.
My solution is to modify Rails to suit FastCGI as same as CGI.

Rails has the specification to be controlled with environmental
variables,
but on FastCGI, there is incompatibility about env. variables set by
system (via FastCGI protocol).

I found that applications that have same spec. merge FastCGI env.
variables and process's by themselves.
Rails is not an user application but a middleware, so Rails should
behave like that, I think.

Then, my current way to avoid this problem is overriding
FCGI::RecordBuffer#env to import ENV in dispatch.fcgi.

> require File.dirname(__FILE__) + "/../config/environment"
> require 'fcgi_handler'
>
> class FCGI
>     class RecordBuffer
>         def env
>             h = {}
>             h.update(ENV)
>             @envs.each { |e| h.update(e.values) }
>             return h
>         end
>     end
> end
>
> RailsFCGIHandler.process!

I don't think that Ruby-FCGI should not include this function because
it must be just a protocol stack.

Could you show me your opinion?


Thank you for your reading.
Sincerely,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to