I was unable to find any documentation on what status codes result in an IOErrorEvent instead of the complete event. It might be that you get a complete event when you get a 401 status code and that IOError is for more severe failures. You can try filing a bug and asking the Adobe Flash runtime team.
-Alex On 5/27/14 7:35 AM, "storo84" <[email protected]> wrote: >Hello Alex, > >I did what you asked and modified the application to the following: > >Test application code > >/*<?xml version="1.0" encoding="utf-8"?> ><s:View xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"> > > <fx:Script> > > </fx:Script> > > <fx:Declarations> > <s:HTTPService id="configurationService" > result="serviceResultHandler(event)" >fault="servicefaultHandler(event)"/> > </fx:Declarations> > > <s:Button id="configButton" > label="High Level" > horizontalCenter="100" top="20" > click="configHandler(event)"/> > <s:Button id="configButton2" > label="Low Level" > horizontalCenter="-100" top="20" > click="config2Handler(event)"/> > <s:TextArea id="textArea" > left="20" right="20" top="{configButton.y + > configButton.height + 20}" >bottom="20"/> ></s:View>*/ > >As you can see it's incredibly simple. I ran it both on the Flash >simulator >and on the device. The behaviour was very different in both situations. > >Results on the Flash Builder Simulator > >- When pressing the "Low Level" button (URL Loader) the text on the text >area was: > /Connecting to server using a low level component > ... > Entering openHandler > openHandler: [Event type="open" bubbles=false cancelable=false >eventPhase=2] > Entering httpStatusHandler > httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false >cancelable=false eventPhase=2 status=401 responseURL=null] > *Entering ioErrorHandler > ioErrorHandler: [IOErrorEvent type="ioError" bubbles=false >cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: >http://10.0.0.221/api/v1/room/current/" errorID=2032]*/ > >- When pressing the "High Level" button (HTTPService) the text on the text >area was: > /Connecting to server using a high level component > ... > *Entering servicefaultHandler* > HTTP status code is: 401/ > >Results on the Android device > >- When pressing the "Low Level" button (URL Loader) the text on the text >area was: > /Connecting to server using a low level component > ... > Entering openHandler > openHandler: [Event type="open" bubbles=false cancelable=false >eventPhase=2] > Entering httpStatusHandler > httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false >cancelable=false eventPhase=2 status=401 *redirected=false* >responseURL=null] > *Entering completeHandler > completeHandler*: / > >- When pressing the "High Level" button (HTTPService) the text on the text >area was: > /Connecting to server using a high level component > ... > *Entering serviceResultHandler* > HTTP status code is: 401/ > >When I ran the app on the Flash Builder's Simulator, both components >worked >as expected, meaning that they dispatched a FaultEvent and an >IOErrorEvent. >On the Android device each component misbehaived, the first dispatching a >ResultEvent and the second one an Event.COMPLETE event. > >Notice that on both scenarios, both components percieve the correct HTTP >status code. > >I would assume that there is a problem with the runtime, right? > >I'd appreciate your comments on the matter. > > > >-- >View this message in context: >http://apache-flex-users.2333346.n4.nabble.com/Flex-s-HTTPService-dispatch >es-a-ResultEvent-instead-of-a-FaultEvent-tp6638p6646.html >Sent from the Apache Flex Users mailing list archive at Nabble.com.
