Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Session-Cookie appearing in content

#2093

Hi there,

I have a problem with session cookies appearing in the content (on beginning of html output). like this: Set-Cookie: _wgspion_session=BAh7CjoPc2Vzc2lvbl9pZCIlY2FlOTg0YWY5M2FkNmI5Zjc2MmQ4OGQyMDgyM2EyYzQ6D3RyYWNrZWRfaXBUOgx1c2VyX2lkaQL6HCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsGOgplcnJvciIWZmxhc2gubG9naW4uZXJyb3IGOgpAdXNlZHsGOwlUOgljaXR5IgxIYW1idXJn--b3e3d16abded5ecf6612e1ff9e9c2afab4d85e66; path=/; HttpOnly

Its the latest Edge. I'm using Rack 0.9.0, the newest mod_rails and apache 2.

Best,

Tobias

Reported by Tobsch · February 27th, 2009 @ 11:44 AM

State: invalid
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Tobsch
    Tobsch

    See the attached image...

    February 27th, 2009 @ 11:45 AM

  2. David Smalley
    David Smalley

    I am also seeing this issue, will investigate

    March 2nd, 2009 @ 01:56 PM

  3. David Smalley
    David Smalley

    I wasn't able to precisely pin down at what point the Set-Cookie line gets added into the body. I was able to fix the issue by switching to the :active_record_store instead of using the cookie sessions.

    It seems the issue only appears in cookie based sessions and only if you start setting extra cookies.

    In my case I am using an old version of the restful_authentication plugin and it is only if the remember_me cookie is set that the session cookie gets printed into the body.

    e.g. cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at }

    Then the Set-Cookie line appears in the body of the page, but only contains the session cookie.

    Checking headers in Firebug the "Cookie:" header contains both the auth_token and the session cookie.

    Will continue to investigate...

    March 2nd, 2009 @ 02:15 PM

  4. thedarkone
    thedarkone

    Upgrade to Passenger 2.1, it should be fixed there.

    March 2nd, 2009 @ 04:34 PM

  5. Richard Poirier
    Richard Poirier

    Same problem here. Anywhere I was setting a cookie in the app now puts it in the body of the response. This is with Passenger 2.0.6. It doesn't happen on mongrel.

    March 4th, 2009 @ 06:46 AM

  6. richy zhang
    richy zhang

    I have such a problem with Passenger 2.0.6 too. However, after Passenger is upgraded to 2.1.1, the problem disappears. This version of passenger is still in beta, so you can't get it from rubyforge. You may take a look at their blog(http://blog.phusion.nl/2009/03/0...>

    March 6th, 2009 @ 11:09 AM

  7. James Chen
    James Chen

    Same problem here. Upgrading to Passenger 2.1.1(beta) solved the problem.

    March 8th, 2009 @ 04:33 AM

  8. Pratik
    Pratik
    • Assigned user set to Pratik
    • State changed from new to invalid

    Hongli confirmed upgrading to passenger 2.1.1 solves the problem.

    Thanks.

    March 8th, 2009 @ 12:01 PM