Jump to content
Search Community

LoaderItem request forming bug

jgondek test
Moderator Tag

Recommended Posts

Hello,

 

I'm loading some images that are loaded through the proxy and I see, that variables that are postponed to the reqest make it a not valid request:

 

http://10.1.1.196:88/frontend/index.php/proxy?url=http://www.mydomain.com/image/resolution/high&with_proxy=truegsCacheBusterID=1363618254154&=&purpose=audit
 

 

I've changed lone 119 in LoaderItem.as to:

 

_setRequestURL(request, _url, (!_isLocal || _url.substr(0, 4) == "http") ? ((_url.indexOf("?") != 0) ? "&" : "?") + "gsCacheBusterID=" + (_cacheID++) + "&purpose=audit" : "");
 

to fix this.

 

Best regards

Jakub Gondek

Link to comment
Share on other sites

No, actually I think that's just a band-aid that may work in this particular case, but it's not a robust solution. I'm pretty sure that the real problem is that you're using a malformed URL, like one that has two "?" in it instead of encoding the values properly. For example: 

 

//BAD:
"http://mydomain.com?url=http://otherdomain.com?param=value"

//GOOD:
"http://mydomain.com?url=http%3A%2F%2Fotherdomain.com%3Fparam%3Dvalue"

//you can use this to encode the value:
var otherURL:String = "http://otherdomain.com?param=value";
var url:String = "http://mydomain.com?url=" + escape(otherURL);

Maybe I missed something, though. Let me know if this doesn't clear things up.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...