Ticket #182 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Memory session not functional ...

Reported by: ra..@iprobot.com Assigned to:
Priority: medium Milestone: 0.4
Component: Merb Keywords:
Cc:

Description

Memory session's do not work here ... Please verify ...

Change History

09/15/07 23:45:38 changed by jon.egil.stra..@gmail.com

  • status changed from new to closed.
  • resolution set to invalid.

Dear raid

You need to describe your errors more closely. Please read http://www.chiark.greenend.org.uk/~sgtatham/bugs.html (among others) and restate your bugreport.

Until then, I invalidate this ticket. By that I am not saying your error is invalid, it might be very real and I thank you for reporting it, but the report per se is not up to par. Please appreciate that precise reporting is needed for this (potential) bug to be removed. When you redescribe the bug, just reopen the ticket.

All the best. Jon Egil Strand

09/17/07 05:46:52 changed by ra..@iprobot.com

  • status changed from closed to reopened.
  • resolution deleted.

ahhh You to lazy to verify ? what more can i say then memory sessions do not work!
Please try play with :
#:session_store: cookie

:session_store: memory
while using this helper : http://pastie.caboo.se/97914

then set for ex. session[:asession] = "true" and when running in memory mode it is clerely broken, then try run the same with cookie and alas it is functional.

09/17/07 12:44:31 changed by jon.egil.stra..@gmail.com

dear raid

My agenda is to encourage a decent level of bug reporting. Thank you for elaborating.

All the best JE

09/18/07 17:48:00 changed by alex.boussin..@gmail.com

Hi all, I use this ticket because I too had problems with session_store set to "memory".

I'm using merb svn and after checking the code, I noticed two things:

First:

in lib/merb/controller.rb at line 12 we have:

self._session_id_key = :_session_id

should be:

self._session_id_key = "_session_id"

The reason is that set_cookie (in lib/mixins/controller.rb at line 184) is using to_s on the name of the cookie.

Second:

The class MemorySession? is using the class MemorySessionContainer? to keep track of all the sessions.

After checking MemorySessionContainer?, the method 'setup' defined in lib/session/memory_session.rb at line 96) is never used.

For my testing I just put this *ugly* code in the persist method (same file at line 42):

MemorySessionContainer?.setup if MemorySessionContainer?.sessions.nil?

After I restart the server, it all worked well :)

There must be a better solution for the second part though...

Keep on the good work guys [[BR]]

Alex

09/18/07 18:40:03 changed by e.@brainspl.at

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [650]) fixed memory sessions. closes #182