Improving content type handling
If request content type not empty, means user expecting something else, do not override it.
@@ -61,6 +61,9 @@ class LoaderInfo extends URLLoader
var dot = pendingURL.lastIndexOf(".");
var extension = dot > 0 ? pendingURL.substr(dot + 1).toLowerCase() : "";
+ if(request.contentType == null ||
+ request.contentType.length == 0 ||
+ request.contentType == "application/x-www-form-urlencoded")
contentType = switch(extension)
{
case "swf": "application/x-shockwave-flash";
@@ -71,6 +74,7 @@ class LoaderInfo extends URLLoader
throw "Unrecognized file " + pendingURL;
}
+
url = null;
super.load(request);
