That sounds like a good idea. There was some code in the swf kernel which
does something
similar; flash cross domain errors also returned no info, so when an empty
request came back, we had the debugger suggest that
the developer look at crossdomain.xml configuration.


On Thu, Apr 21, 2011 at 7:17 AM, Raju Bitter <
[email protected]> wrote:

> I've been testing a bit more with CORS/cross-origin resource sharing.
> One problem is that when you make a CORS request which fails (when the
> server you are sending the request to doesn't return the expected
> response header Access-Control-Allow-Origin), you will get an HTTP
> status of 0 (zero) for the request, and the readyState will be 4.
>
> The response headers are not available due to security reasons,
> therefore there is no way to detect what went wrong. What could be
> done though is to compare the requesturl of the LzHTTPLoader object
> and compare the domain contained within requesturl with the domain for
> document.location. If it's a cross-origin request, the LFC could dump
> a warning into the Laszlo Debugger that something might have gone
> wrong with a CORS request.
>
> What do you think?
>



-- 
Henry Minsky
Software Architect
[email protected]

Reply via email to