第一次写东西,请大家多多指教。
如题:总是提示如下错误:
发生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
程序可正常运转。
如题:总是提示如下错误:
发生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
程序可正常运转。