Displaying 20 results from an estimated 41 matches for "cgirequest".
2007 Nov 06
1
[PATCH] ActionController::CgiRequest#host_with_port() should handle standard port
Hi everyone,
I''m looking for some +1''s for a bug fix patch I submitted:
http://dev.rubyonrails.org/ticket/10082
The problem is that CgiRequest#host_with_port() overrides
AbstractRequest#host_with_port() and does''nt use port_string()
with standard_port() care.
So I created patch to rename CgiRequest#host_with_port() to
host_with_port_without_standard_port_handling().
And then CgiRequest#host_with_port() is inherited AbstractRequ...
2006 Feb 08
10
Sharing sessions between subdomains?
Hello,
I know how to share sessions between subdomains in PHP. Can anyone please guide me as to how I can share sessions using Ruby? Where can I set the value of domain for which the cookie is set?
I would like for a user to login on the home page and then go to blog.home.com and not have to login again.
Any guidance/pointers are appreciated.
Thanks''
2006 Jul 11
1
Dynamically setting the session domain?
Does anyone know a way to dynamically change the session_domain option
of ActionController::CgiRequest? I want to have a login section on an
index page (www.example.com) that takes a subdomain, username,
password, authenticates, then redirects to
http://#{subdomain}.mysite.com.
I need to set the session_domain option (to the subdomain) dynamically
so the cookie can be read when the user arrives af...
2006 Apr 12
1
Dealing with documentation : how to find REAL doc ?
...nning on different
platforms, I definitively find the documentation not enough precise. But
those are my thoughts and I hope somebody can point my out to the good
way to find something.
For example, I currently look for information about session managment,
and find the code :
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update (:prefix =>
"something")
Wow ! What''s this ? I take the rails doc and could not find CgiRequest,
neither DEFAULT_xxx. Following it''s in the ActionController, I find this
module is in the actionpack (by search it manually in the file...
2005 Dec 30
6
Unable to get the domain in my routes.rb to map custom route tables per domain
I have tried all night trying to find a way to get the host name which is
currently being used within my routes.rb file to do some case/when switching
for specific domains such as this
cgi = ActionController::CgiRequest.new(CGI.new)
case cgi.domain(1)
when /www/
map.connect '''', :controller => ''public'', :action =>
''index''
when /internal/
map.connect '''', :controller => ''admin'', :action =>
''index&...
2006 May 17
3
Session in ActiveRecordStore
The Agile book seems to say I should specify this as follows, probably in the
environments.rb:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
CGI::Session::ActiveRecordStore
BUT the environments.rb file would have me Un-Comment this:
config.action_controller.session_store = :active_record_store
Anyway, I''ve tried both, and in both cases it generates new sessions all too qui...
2006 Feb 09
1
session cookie expiration
from the Agile Book, i see i can set the absolute session expiry time via:
ActionController::CGIRequest::DEFAULT_SESSION_OPTIONS[:session_expires]
however, I don''t see anything about what the actual default setting is when
a session is created.
also, is there a way to set the expiration to happen when the browser is
closed?
in PHP, this can be accomplished using
session.cookie_lifetime 0...
2006 Feb 11
2
Session ID in a cookie?
I''ve been looking around for how to store the session ID in a cookie.
The "Agile Web Development with Rails" books seems to indicate that this
is done by default with Rails. But I don''t see a cookie being set in my
browser. (yeah, they''re enabled)
I poked through the RForum code to find something referencing "cookies"
but nothing came up.
Does
2008 Feb 09
1
how to check the config.action_controller.session options ?
...nfig.action_controller.session = {
:session_key => ''_myapp_session'',
:secret => ''3a64394bb895f1f05e0c07f71127d93d''
}
I cannot get it back in the script/console ..
:session_key=>"_session_id" !!!
why ?
>> ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
=> {:session_key=>"_session_id", :cookie_only=>true, :session_path=>"/",
:prefix=>"ruby_sess.", :database_manager=>CGI::Session::CookieStore,
:tmpdir=>"/Users/myself/tmp/sessions/"}
how can get back the :session...
2008 Jun 30
0
request headersSo the
...s HTTP headers, for example:
request.headers["Content-Type"] # => "text/plain"
*************
Sounds simple enough. But when running in development mode on the local
server (start with ./script/server; mongrel installed), I find that my
request object is an ActionController::CgiRequest, and it has no headers
method defined. ("CgiRequest and TestRequest provide concrete
implementations.", do they now?)
Huh? What am I missing, how do I get request headers? And should this
documentation be fixed?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~-------...
2005 Aug 06
2
Problem with 0.13.1 ActiveRecordStore with PG 8.0.3.
Hi,
I put the following in my environment.rb file:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
(:database_manager => CGI::Session::ActiveRecordStore)
Runnning WEBrick via "script/server" and trying to load any page
served by a controller results in an error like the following:
#<ActiveRecord::StatementInvalid: ERROR: null value in column...
2006 Mar 03
1
number_to_currency() helper == non DRY == could be improved
...but it''s still not exactly DRY nor elegant
is it ?
Instead I would propose as similar scheme to the ''session_key''
override functionality that I use a lot.
## add a custom session ID for this site (when developing with many
apps on local system)
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] =
''00_shows_at_top_of_sorted_cookies_list''
Whereby we could define the DEFAULT_CURRENCY_TYPE in the
environment.rb or something similar.
However, an app could also need to be localized, ie I might want the
default currency to be ? and...
2006 Apr 20
12
memcache, sessions, fragments, oh my!
Hi all -
I am trying to get rails to use memcache for sessions and fragment
caching. I''d also like to use the same connection for general caching of
this and that.
I''m following the instructions here:
http://wiki.rubyonrails.com/rails/pages/HowtoChangeSessionStore
and hitting a brick wall.
I''m using the new memcache-client since from what I''ve read
2006 Mar 07
2
memcached and Joe Hosteny''s Salted Hash Login Generator
Hey,
so - I''ve been fiddling about and fell in to use Joe''s simple-yet-
painful SHLG (I shouldn''t complain... not at least I have time to
produce one :)). I just recently plugged in memcache, and- it''s not
preserving my login.
I traced the execution and it sets the output of User.authenticate (a
user AR object) into @session[''user'']
2006 Jul 03
3
Sharing Session Between Two Applications
Hi
We have a rails application deployed and working fine. Along with this, we are planning to add "Opinion" forum. The url of the forum will be like http://forum.mymainsite.com Is it possible to share the session (that is, if the user is already logged in on the main site, he need not log in again on the forum section).
Is it possible to add the ''opinion'' as a
2008 Jun 19
5
How do you create one session cookie for multiple subdomains
I am using the restful authentication plugin and am always prompted to
login if a different subdomain is accessed. I have found a couple rails
"solutions", but none of them seem to work:
# development.rb
1. ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key]
= ".localhost"
2. ActionController::Base.session_options[:key] = ".localhost"
Does anyone have a way that works?
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this m...
2006 Jul 21
3
Help me run rails on apache on Linux Fedora
...details what I learned yesterday by putting puts statements in
the code, printing interesting things and following along to
see what was blowing up. I followed it to:
/usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/dispatcher.rb
And in particular the the lines:
request, response = ActionController::CgiRequest.new(cgi, session_options), ActionController::CgiResponse.new(cgi)
prepare_application
ActionController::Routing::Routes.recognize!(request).process(request, response).out(output)
It seems that both request and response are nil, at least I get I 500 error
if I try to access them in some way.
Any h...
2006 Jan 17
10
ActiveRecord + memcache = cached_model
...CACHE = MemCache.new memcache_options
CACHE.servers = ''localhost:11211''
session_options = {
:database_manager => CGI::Session::MemCacheStore,
:cache => CACHE,
:session_domain => ''trackmap.robotcoop.com''
}
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
session_options
You will need separate namespaces for production and development, if
using
memcache on the same machine.
Note that using memcache with tests will cause test failures, so set
your
memcache to be readonly for the test environment.
Then make Rai...
2006 Mar 07
0
Storing sessions files elsewhere on EdgeRails
Hi all,
In a Rails 1.0 project, I successfully changed the sessions storage
location to <RAILS-ROOT>/tmp, by adding
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:tmpdir =>
File.join(RAILS_ROOT, ''/tmp''))
in environment.rb
Problem:
--------
I tried to use the same trick in an EdgeRails project, but it doesn''t
work : server error, with no msg in the logs.
(MacOS X, with Locomotive.)
When I star...
2006 Feb 01
1
Unwanted sessions after routing error
...n
is raised then the session file is created.
I see this behavior in both the development (WEBrick) and production
(Apache) environments.
After reading
<http://wiki.rubyonrails.org/rails/pages/HowtoChangeSessionOptions>, I
tried this as a workaround in environment.rb:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:disabled
=> true)
That didn''t help.
It appears that this problem occurs after the render_* methods, while
ActionController is building the response, so I''m not sure how to
workaround it.
FYI, I found this problem because of a bad image URL...