This project is archived and is in readonly mode.

#5197 ✓stale
James Le Cuirot

session_id is not set when using Mongrel and mem_cache_store

Reported by James Le Cuirot | July 26th, 2010 @ 02:53 PM

Commit [f8f365346ec55ef388eaa43e30bd7629c375d274], which resulted from ticket #2485, tries to ensure that the session_id cookie is not set repeatedly when it hasn't changed. However, I have found that this cookie is NEVER set when using Mongrel and mem_cache_store. I must admit that I'm not entirely sure what's going on but it looks like a chicken and egg scenario. It checks whether env["rack.request.cookie_hash"] is present before setting the cookie but this is missing when no cookies have been set yet. I'm using Rack 1.1.0 and, after checking that code, this seems to be missing because HTTP_COOKIE is also missing. This applies to 2-3-stable. I haven't tried Rails 3 yet.

Comments and changes to this ticket

  • José Valim

    José Valim July 26th, 2010 @ 03:07 PM

    • Importance changed from “” to “Low”

    I think you forgot to apply the patch?

  • José Valim

    José Valim July 26th, 2010 @ 03:07 PM

    And if you could, it would be nice to check how it works on Rails 3.0. We want to release the RC really soon!

  • James Le Cuirot

    James Le Cuirot July 26th, 2010 @ 03:11 PM

    Sorry, when I said "this applies to 2-3-stable", I was referring to the issue itself. I haven't written a patch because I'm not 100% certain about what's going on here.

    I'm away on business for a few days but I'll try to test it in Rails 3 when I get back.

  • James Le Cuirot

    James Le Cuirot July 26th, 2010 @ 03:13 PM

    To clarify, reverting the commit fixes the issue for me.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:34 PM

    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:34 PM

    • State changed from “open” to “stale”

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>

Pages