Ruby on rails Rails在升级2.3.5之后给出了错误的标题->;2.3.8
我刚从Rails2.3.5升级到Rails2.3.8,但现在我的重定向无法正常工作 我得到以下作为响应HTTP头:Ruby on rails Rails在升级2.3.5之后给出了错误的标题->;2.3.8,ruby-on-rails,http-headers,Ruby On Rails,Http Headers,我刚从Rails2.3.5升级到Rails2.3.8,但现在我的重定向无法正常工作 我得到以下作为响应HTTP头: HTTP/1.1 302 Moved Temporarily Date: Wed, 02 Jun 2010 09:40:39 GMT Content-Length: 93 Content-Type: text/html 而我之前得到: HTTP/1.1 302 Moved Temporarily Connection: close Date: Wed, 02 Jun 2010 0
HTTP/1.1 302 Moved Temporarily
Date: Wed, 02 Jun 2010 09:40:39 GMT
Content-Length: 93
Content-Type: text/html
而我之前得到:
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
HTTP/1.1 302临时移动
连接:关闭
日期:2010年6月2日星期三09:41:18 GMT
设置Cookie:_会话_id=;路径=/
状态:302找到
地点:
缓存控制:没有缓存
服务器:Mongrel 1.1.5
内容类型:text/html;字符集=utf-8
内容长度:93
有人知道怎么解决这个问题吗?尽管重定向不起作用,但登录cookie也没有设置(但我认为,这两者在某种程度上是相关的)
我已经尝试覆盖重定向到以设置response.headers['Location']等,但它们没有出现在响应中
编辑:好的,这似乎是mongrel_rails和rails 2.3.8的一个缺陷,脚本/服务器没有这个问题。我认为rails 2.3.8不再支持mongrel。尝试使用thin app server,您可能看不到该错误。我通过降级到2.3.5来修复位置缺失问题。如果您希望继续使用Mongrel,请访问此链接并向下滚动到bshand的注释以获得修复:
这是个非常糟糕的主意。