URLRequest HTTPStatus=0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

URLRequest HTTPStatus=0

go2ghana
  Hi,
once again a flash related problem
which I couldn't find a solution for on google:

The HTTPStatusEvent returns 0 before the loading  of any runtime
resources with Loader or URLLoader
successfully! completes. Never cared about before since my apps usually
watched for IOErrorEvent only.
But now I would like to know if anyone noticed this weird behaviour and
how I can get the correct 200 status code?

Cordially,
Axel


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: URLRequest HTTPStatus=0

clemos
Hi

I think you mean the status property of the HTTPStatusEvent.
I also assume you run your app in a browser.
If so, it's a Flash Player issue:
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/HTTPStatusEvent.html#status
"If Flash Player or AIR cannot get a status code from the server, or
if it cannot communicate with the server, the default value of 0 is
passed to your code. A value of 0 can be generated in any player (for
example, if a malformed URL is requested), and a value of 0 is always
generated by the Flash Player plug-in when it is run in the following
browsers, which do not pass HTTP status codes to the player: Netscape,
Mozilla, Safari, Opera, and Internet Explorer for the Macintosh."

++++++
Clément

On Wed, Jun 2, 2010 at 3:45 PM, Axel Huizinga <[hidden email]> wrote:

>  Hi,
> once again a flash related problem
> which I couldn't find a solution for on google:
>
> The HTTPStatusEvent returns 0 before the loading  of any runtime resources
> with Loader or URLLoader
> successfully! completes. Never cared about before since my apps usually
> watched for IOErrorEvent only.
> But now I would like to know if anyone noticed this weird behaviour and how
> I can get the correct 200 status code?
>
> Cordially,
> Axel
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org