rem: if (preventCaching && Freja.AssetManager.HTTP_METHOD_TUNNEL) { 
add: /* Why using HTTP_METHOD_TUNNEL for a GET? if (preventCaching && Freja.AssetManager.HTTP_METHOD_TUNNEL) { 
context: Freja.AssetManager.loadAsset = function(url, preventCaching) {	var match = /^(file:\/\/.*\/)([^\/]*)$/.exec(window.location.href);	if (match) {		url = match[1] + url; // local	}	var d = Freja._aux.createDeferred();	var handler = function(transport) {		try {			if (transport.responseText == "") {				throw new Error("Empty response.");			}			if (transport.responseXML.xml == "") {				// The server doesn't reply with Content-Type: text/xml				// this will happen if the file is loaded locally (through file://)				var document = Freja._aux.loadXML(transport.responseText);			} else {				var document = transport.responseXML;			}		} catch (ex) {			d.errback(ex);		}		d.callback(document);	};	try {		if (preventCaching && Freja.AssetManager.HTTP_METHOD_TUNNEL) {			var req = Freja._aux.openXMLHttpRequest("POST", url, Freja.AssetManager.HTTP_REQUEST_TYPE == "async", Freja.AssetManager._username, Freja.AssetManager._password);			req.setRequestHeader(Freja.AssetManager.HTTP_METHOD_TUNNEL, "GET");			req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		} else {			var req = Freja._aux.openXMLHttpRequest("GET", url, Freja.AssetManager.HTTP_REQUEST_TYPE == "async", Freja.AssetManager._username, Freja.AssetManager._password);		}		// This shouldn't be nescesary, but alas it is - firefox chokes		// It's probably due to an error in MochiKit, so the problem		// should be fixed there.		var comm = Freja._aux.sendXMLHttpRequest(req);		if (Freja.AssetManager.HTTP_REQUEST_TYPE == "async") {			comm.addCallbacks(handler, Freja._aux.bind(d.errback, d));		} else {			if (req.status == 0 || req.status == 200 || req.status == 304) {				handler(req);			} else {				d.errback(new Error("Request failed:" + req.status));			}		}	} catch (ex) {		d.errback(ex);	}	return d;};
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/f73b630e3734da3a09a5647c548916a9bd52fb9c/AssetManager.js/clean/trunk/src/AssetManager.js