Flex - 2032: IE only stream error

I am getting 2032 error from Flash in response to POST requests that return "201 Created" in IE (Firefox works fine). Since Flash does not provide access to HTTP status, I cannot say that it actually succeeded. The request is made using HTTPService.

Any suggestions? Has anyone else seen this?

Thanks, Alex

+1


source to share


2 answers


I found a way in this Flex on Rails application. I saw the same problem in IE - my version of the .log in Rails gave a 201 message, but this caused an error returning to Flex. I found a link in a new book titled "Flex On Rails" by Tony Hillerson and Daniel Wanji, on p. 31. It includes catching error 201 and changing the title. Here is my ApplicationController file:

 class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
  include AuthenticatedSystem
  before_filter :login_required


  after_filter :flex_error_handling
  def flex_error_handling
    response.headers['Status'] = interpret_status(200) if response.headers['Status'] == interpret_status(422)
    response.headers['Status'] = interpret_status(200) if response.headers['Status'] == interpret_status(201)
  end
  def rescue_action_in_public(exception)
    render_exception(exception)


  end
  def rescue_action_locally(exception)
    render_exception(exception)
  end
    rescue_from ActiveRecord::RecordNotFound, :with => :render_exception
  def render_exception(exception)
    render :text => "<errors><error>#{exception}</error></errors>", :status => 200
  end
end

      



The action of changing status message 422 to 200 was part of the original Hillerman / Wanja proposal to change stream error 2032 to something more friendly so that invalid write errors are sent back to the Flex interface.

+4


source


Try using a debug proxy to peek into the traffic, I like Charles .



+1


source







All Articles