Another improvement I would add is to show the description of
SecurityErrorEvents in the debug window. This is important for the
crossdomain.xml problems developers run into. Currently - when you
have a crossdomain.xml related security error - the only error you get
is the onerror event on the dataset/datapointer.
Take this dataset as an example:
<dataset name="myds" src="https://www.laszlosystems.com"
request="false" proxied="false" timeout="5000">
<handler name="onerror" args="e">
Debug.write(this.name + ': error');
</handler>
</dataset>
If you do a request on it, you don't get any warning, but will just
get an onerror event. But Flash gives us a detailed description of
what went wrong:
Error #2048: Security sandbox violation:
http://localhost:8080/trunk/dataset-crossdomain.lzx?lzt=swf&lzoptions=proxied%28false%29%2Cruntime%28swf10%29
cannot load data from https://laszlosystems.com?__lzbc__=ffm4ww.
I suggest that we dump this warning into the debugger window using
Debug.warn() within the function LzHTTPLoader#securityErrorHandler.
On Thu, Apr 14, 2011 at 10:34 AM, Raju Bitter
<[email protected]> wrote:
> Flash for quite some time now supports returning the HTTP status code
> for a URLRequest. I've added support for that to the LzHTTPLoader
> class for the SWF10 runtime:
> http://jira.openlaszlo.org/jira/browse/LPP-9894
>
> By calling getResponseStatus() it's possible to retrieve the response
> status code of the last request for a dataset. Currently there is no
> public API to access the LzHTTPLoader instance, but the method can be
> reached through someDataset.dataRequest.loader.getResponseStatus().
> How should that method/value be exposed on the dataset? Should we add
> an attribute "responsestatus"?
>
> DHTML supports response status values already, that means the
> functionality would be available for unproxied datasets across
> runtimes.
>