Displaying 20 results from an estimated 60000 matches similar to: "WEBrick cookies not persisting?"
2006 Jan 07
2
can store array or hash in cookies?
Hi
According to rdoc: value - the cookie''s value or list of values (as an
array).
So, I can use arrays, briliant.
But.... It does not work (at least on webrick)
I wrote a controller:
def check_cookies_first
cookies[:chef] =
{:value => ["first", "second"], :expires => Time.local
(2020)}
render_text ":)"
end
def
2006 Apr 18
1
''depot''app, trouble with session / cookies
Many of you probably know the ''depot'' app from the ''Agile Rails
development'' book.
When the view changes from ''Store'' to ''display_cart,'' a session
containing the shopping-cart (:cart) is supposed maintain the ''cart''
between calls, but when the display_cart stub view shows up, I have
always ZERO elements
2006 Jan 10
1
Cooky cookies causes trouble
Hi All,
Yesterday wrote about my troubles with naming a table and model cookies and
cookie respectively. I know that everybody hates the newbie screaming bug as
soon as he encounters behaviour he doesn''t understand. But I''ve reproduced
the error in the simplest application possible, and dare therefore say that
this quite possible could be a bug in Rails.
Database:
CREATE TABLE
2006 Jan 11
0
Cookies, models and nil objects
Still new in my ROR walk, been busily coding on a game application as a
fruitful exercise in becoming proficient in Ruby/ROR. However, I seem to
have hit a speed bump and am befuddled over some exhibited behavior in
ROR.
1. **Cookies** - on page 312 of the AWDwR book by DT and DHH, it states
that if you create a cookie by assigning a value to cookies[name], you
get a "default set of
2006 Jan 09
1
Cooky Cookies
Hi All,
I have a problem with the stemming(?) in rails. I have a table cookie and a
Cookie model which I have generated a scaffold for. The problem is that
rails starts looking for a file that it calls "cooky.rb", this must be some
kind of misunderstanding between me and rails, but how do I correct it?
Other scaffolds work just fine.
/Hugo
NameError in Cookie#index
uninitialized
2006 Apr 28
3
persistent cookies
hello,
I am trying to implement a "remember be" box for logins, however I cant
seem to get it to work. I have tried the following 2 methods but neither
seem to work. When i check the expiry time in firefox it always says "end
of session".
What is the proper way to handle this so the session cookie "_session_id"
doesnt expire for a year?
I tried
2009 Sep 25
0
Authentication with Cookies instead of CookieStore Sessions
I would like to persist the user authentication between user sessions
(basically a "remind me" by default).
Sessions expire while cookies persist: why should I use a session for
authentication and then another different cookie for the "remind me"?
Can''t I simply store a cookie whith a token and use it for both
authentication and persistence?
--
Posted via
2005 Nov 14
1
Webrick suddenly down w/bad redirection - look familiar?
Has anybody seen this?
"Firefox has detected that the server is redirecting the request for this
address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to
accept cookies."
I''ve checked the cookies and that''s not it. This is a webrick server
running on localhost under Radrails. It was working well, and
2006 Mar 24
2
Basic Auth in WEBrick
Yo all,
All I want to accomplish at this moment in time is simple password
protection around a rails application in development using WEBrick on
a custom port. Just one account would be fine.
I have done an extensive Google hunt for an example, but I all find
are code chunks for starting WEBrick such as:
realm = "Gnome realm"
start_webrick {|server|
htpasswd
2006 Feb 19
0
Re: can store array or hash in cookies?
Not a bug. A cookie is just a string. You can turn anything into a
string and store it in a cookie. Something very simple like the
following might work for you:
array_for_cookie = [1,4,5,7]
cookies[:foo] = array_for_cookie .to_s
array_from_cookie = cookies[:foo][1..-2].split('','')
(And if you are just storing a single integer in a cookie be sure to
turn it into a
2003 Oct 12
0
idea (and patch): connection cookies
I have an idea for a protocol extension to limit the exposure of the
complex crypto code in ssh servers. It's like tcp-wrappers, but based
on a secret token rather than IP address.
Patch against openssh-3.7.1p2:
http://nick.cleaton.net/openssh-cc-0.03.patch
Details
=======
The "Connection Cookies" mechanism is an unofficial ssh protocol
extension designed to prevent attackers
2010 Nov 14
1
RCurl and cookies in POST requests
Hello.
I know that it's usually possible to write cookies to a cookie
file by removing the curl handle and doing a gc() call. I can do
this with getURL(), but I just can't obtain the same results with
postForm().
If I use:
curlHandle <- getCurlHandle(cookiefile=FILE, cookiejar=FILE)
and then do:
getURL(http://example.com/script.cgi, curl=curlHandle)
rm(curlHandle)
gc()
it's
2006 Jul 08
0
Testing cookies - integration tests
Hello,
I''m trying to test some cookie code with some integration tests, but I''m
not sure if this is possible.
Currently I''m creating a session (using open_session) running some code
that sets my cookie and this works fine, the cookie is being set. Now
cookies are supposed to exist across different sessions, so I try to
create a new session (again with
2006 Jan 08
6
Persistent session cookies?
It seems Rails sessions by default only last, well, a browsing session.
If the Rails app keeps track of logged-in state by sessions, that state
doesn''t survive restarting the browser.
How best to change this behaviour, to make the session cookie live
forever, or at least beyond browser restarts?
It was suggested to me on IRC to combine sessions with code to generate
a unique id and
2007 Jan 29
2
rspec and cookies
Hello
can anyone tell me how to test cookies using rspec? specifically, I''d like
to be able to set a cookie before a get/post request and also to test the
cookies which have been set by a get/post request
I know I can use cookies[:name] = ''value'' to set a cookie but how would I
set expiry information on such a cookie? when i try to pass a hash {:value
=>
2001 Nov 15
2
X11 cookies and forwarding
I'm guess I wasn't following the whole cookies discussion completely
(putting cookies in /tmp to avoid putting them on NFS, etc.), but I
noticed today that with 2.9.9p2, if I use "ssh -X" to start a shell on the
server, in that shell XAUTHORITY is set to /tmp/ssh-XXXXXXXX/cookies and
there are cookies placed there there. These are the "fake" cookies for
the
2006 Nov 24
0
Maybe a bug in Cookie:cookies
Hi man,
Thank you very much for your good work.
I think there may be a bug in Mechanize 0.6.3. Cookie:cookies (cookie.rb:L83
)
@jar[domain].each_key do |name|
=> if url.path =~ /^#{@jar[domain][name].path}/
if @jar[domain][name].expires.nil?
cookies << @jar[domain][name]
elsif Time.now <
2007 Mar 19
0
cookies
How do I set cookies in a spec so I can see them in my controller, please?
Conversely, why doesn''t this work...
require File.dirname(__FILE__) + ''/../spec_helper''
class TestApplicationController < ApplicationController
def index
@seen = cookies[''auth_token''] || ''NOT seen!''
puts cookies.inspect #
2008 May 17
4
Setting cookies in service overloader thingo
I''m implementing a simpler version of the Cookie Session Store in
Rails 2.0. If you know what that is, skip the next paragraph.
A cookie session store stores the session data inside cookies, on the
client, and signs them using a secret string, hashed together. The
user can decode the cookie easily if they know much about computers
and see what''s inside, but they
2006 Dec 01
2
Mongrel 0.3.18, rails 1.1.6 and cookies
I''ve run into an issue with my rails application being unable to
properly set cookies on Mongrel 0.3.18. If I run the simplified code
below in Mongrel 3.14.4, both cookies are properly sent to and saved
by the browser. With the same code in 0.3.18, only the auth_token
cookie is created (if I switch them, only the userid as it will only
properly create the first cookie in the list.)