Note that there are some explanatory texts on larger screens.

plurals
  1. POCrossdomain policy behaviour on 302 redirects in AS3
    text
    copied!<p>I have crawled the web quite a lot these days, but couldn't get any accurate information on how crossdomain.xml files behave in case of 302 redirects; especially with the sandboxes having changed significantly over the last versions!</p> <p>I am relatively new to flash... so any advice is more than appreciated!</p> <p>I have been working on a project lately that uses audio streams with some sort of CDN distribution! what happens is that a common url is triggered, and then the user is dynamically redirected to the next best server available. In my case, i have no access at the server side of things (at least not anytime soon). And the only path providing an appropriate crossdomain.xml is the one performing the redirect. All the other dynamic paths provide exclusively content!</p> <pre><code>http://resource.domain.com (valid crossdomain.xml) 302 =&gt; http://dyn1.domain.com/... 302 =&gt; http://dyn2.domain.com/... 302 =&gt; http://dyn3.domain.com/... </code></pre> <p>I noticed that flash doesn't care much if i try to load the audio stream with something like...</p> <pre><code>var req :URLRequest = new URLRequest("http://resource.domain.com"); var sound :Sound = new Sound(req); // ie. effectively playing http://dyn3.domain.com sound.play(); </code></pre> <p>It gets both redirecting, and streaming done well! and doesn't bother for any crossdomain file and starts playing!</p> <p>Although when i try something different, like setting up some custom headers to the request and loading the file with URLStream instead, everything gets messy! Well, the redirect gets done, as expected but all of a sudden i need another crossdomain file in the redirected location!</p> <p>Is there any explanation to whats happening and eventually ways to resolve this?! </p> <p>Thanks for your time!</p> <hr> <p>It comes as a site question : i noticed everything to work flawlessly while being in the local-trusted sandbox and errors happening mainly if not exclusively in the remote sandbox. is it possible that the local-trusted sandbox doesn't care about crossdomain policy files at all!?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload