第一次写东西,请大家多多指教。
如题:总是提示如下错误:
发生ActionScript错误
[RPC Fault FaultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error:[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032:Stream Error.URL: http://localhost:3000/bugs/update"].URL: http://localhost:3000/bugs/update"]
at mx.rpc::AbstractInvoker/http://www.adobe:com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at flash.events::EventDispatcherdispatchEventFunction()
at.flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
查看了一下,rails development/log,找到
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request_forgery_protection.rb这个文件,把其中的以下部分:
def verified_request?
!protect_against_forgery? ||
request.method == :get ||
!verifiable_request_format? ||
form_authenticity_token == params[request_forgery_protection_token]
end
改写为:
def verified_request?
!protect_against_forgery? ||
request.method == :post ||
request.method == :get ||
!verifiable_request_format? ||
form_authenticity_token == params[request_forgery_protection_token]
end
程序可正常运转。
分享到:
相关推荐
Flexible Rails(FLEX 3 on RAILS 2)是一种创新的技术组合,它结合了Ruby on Rails 强大的后端处理能力和Adobe Flex 在前端展示方面的优势,为开发人员提供了构建高性能Web应用的新途径。通过本书的学习,开发者...
结合 Rails 的后端能力和 Flex 的前端表现力,可以创建出功能强大且用户体验优秀的 Web 应用。 ##### 9. AASM:工作流解决方案 **知识点:** Chee Yeo 解释了如何使用 AASM(Active State Machine)来实现在 Ruby ...
3. **数据绑定**:Flex 2支持双向数据绑定,这使得开发者可以在模型和视图之间建立动态链接,当模型数据发生变化时,视图会自动更新。 4. **事件处理**:Flex 2采用事件驱动的架构,通过监听器机制来处理用户的交互...
2. **定位机制**:CSS提供了三种定位机制:正常流(block layout)、浮动(float)和绝对定位(position: absolute)。正常流遵循从左到右、从上到下的排列方式;浮动用于创建多列布局,但可能导致父元素高度塌陷;...