views:

354

answers:

3

I just upgraded from rails 2.3.5 to rails 2.3.8, but now my redirects are not working properly.

I get the following as the response HTTP Headers:

HTTP/1.1 302 Moved Temporarily
Date: Wed, 02 Jun 2010 09:40:39 GMT
Content-Length: 93
Content-Type: text/html

whereas I got previous:

HTTP/1.1 302 Moved Temporarily
Connection: close
Date: Wed, 02 Jun 2010 09:41:18 GMT
Set-Cookie: _session_id=<correct id>; path=/
Status: 302 Found
Location: <correct url>
Cache-Control: no-cache
Server: Mongrel 1.1.5
Content-Type: text/html; charset=utf-8
Content-Length: 93

Anyone knows how to fix this? Despite the fact that the redirect is not working, the login-cookie is not set too (but I think, this is both related somehow).

I have already tried to override redirect_to in order to set response.headers['Location'] etc., but they did not appear in the response.

EDIT: Ok, this seems to be a bug with mongrel_rails together with rails 2.3.8, script/server does not have this problem.

+1  A: 

I believe rails 2.3.8 no longer supports mongrel. Try with thin app server and you will probably not see that error.

todd
A: 

I fix the Location missing issue by downgrading to 2.3.5

Gavin
That's quite a very bad idea.
Damien MATHIEU
A: 

If you'd rather keep using Mongrel, visit this link and scroll down to the comment by bshand for the fix:

https://rails.lighthouseapp.com/projects/8994/tickets/4690-mongrel-doesnt-work-with-rails-238

NudeCanalTroll