crossdomain.xml request begins with appended GET URL Data

786 Views Asked by At

I've created a flash site with a simple hit to a server to pull down search data. The server is a client server, located on another domain, so I created a crossdomain.xml to load at their root.

I kept getting sandbox security errors, so I ran Charles and found that my code is requesting a crossdomain.xml after the urlVariables.

For example. I call

http://searchStuff.com/search?master_device_id=5606&q=email&do=simulator_sayt

And my program looks for the crossdomain.xml here:

http://searchStuff.com/search?master_device_id=5606&q=email&do=simulator_sayt/crossdomain.xml

I've tried using Security.loadPolicyFile, but this doesn't work until it hits the crossdomain.xml at the root (which it is clearly looking for in the wrong place).

I've tried using POST and GET methods, setting the URLRequest.data method and just appending the variables as a string to the original URL. The same problem keeps occurring.

Any insight on what might cause this?

2

There are 2 best solutions below

3
On

You could specify an absolute path in your source:

flash.system.Security.loadPolicyFile("{http://domain.com/crossdomain.xml}");
0
On

Well, I figured it out. It turns out you have to have the "/" before the "?",

ie: The url I was using looked like this:

http://searchStuff.com/search?master_device_id=5606&q=email&do=simulator_sayt

but it needed to look like this

http://searchStuff.com/search/?master_device_id=5606&q=email&do=simulator_sayt

That fixed the problem.