Skip to main content
May 25, 2011
Question

Response data blocked when using urlstream

  • May 25, 2011
  • 5 replies
  • 1053 views

Hi,

I'm able to successfully connect to a remote http-based service, and I can see data coming back in wireshark, but nothing is received via the ProgressEvent in the application. No errors are thrown and I'm listening for http and security errors.

Note, if I run this as a Flex app on the local filesystem in bin-debug the app works just fine.

Does anyone have any clue as to what might be blocking the response data at the AIR application-level?

Any help would be greatly appreciated!

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

Participating Frequently
May 25, 2011

Hi,

are you receiving actual data then?

you could check what are response headers that way:

urlStream.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, streamResponseStatusHandler);

private function streamResponseStatusHandler(event:HTTPStatusEvent):void

{

     trace(event.type+": "+event.status);

     for each(var header:URLRequestHeader in event.responseHeaders)

     {

          trace(header.name+":"+header.value);

     }

}

for example when accessing static page it could return:

httpResponseStatus: 200

Date:Wed, 25 May 2011 22:56:08 GMT

Server:lighttpd/1.4.19

Etag:"-1560866624"

Last-Modified:Fri, 23 Oct 2009 13:34:14 GMT

Content-Type:text/html

Content-Length:362413

Accept-Ranges:bytes

The content length could be hint for engine to report bytes total versus bytes loaded. If not available and content is compressed you could receive 0 for bytes total in your progress handler - which could lead you to assumption that no progress is notified.

regards,

Peter

May 25, 2011

Thanks for the response.

>>are you receiving actual data then?

Yes, but...just not at the AIR application-level. I'm definately getting valid data back as shown in WireShark, but there is zero activity on the .HTTP_RESPONSE_STATUS event listener. That means there isn't any firewall blocking at the Operating System-level.

In WireShark I can see a valid initial POST request and then the data packets are actively streaming back on port xxxxx And, perhaps more important to solving this, the streaming connection stays open which means AIR (or some related process) is actively handling the request/response in the background. I just can't get programmatic access to the return objects in AIR.

Is there a reason why AIR would block the source port for the return payload? On the surface it sounds like a permissions issue somewhere?

FYI..my operating system is Windows 7.

May 26, 2011

Additional info: the app works on a different Windows 7 machine. Must be a permissions issue of some sort. Does anyone understand Windows 7 security to have an idea of where I should start to look?