rem: function doLoad(_29f,http,url,_2a2,_2a3){ if(((http.status>=200)&&(http.status<300))||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){ var ret; if(_29f.method.toLowerCase()=="head"){ var _2a5=http.getAllResponseHeaders(); ret={}; ret.toString=function(){ return _2a5; }; var _2a6=_2a5.split(/[\r\n]+/g); for(var i=0;i<_2a6.length;i++){ var pair=_2a6[i].match(/^([^:]+)\s*:\s*(.+)$/i); if(pair){ ret[pair[1]]=pair[2]; } } }else{ if(_29f.mimetype=="text/javascript"){ try{ ret=dj_eval(http.responseText); } catch(e){ dojo.debug(e); dojo.debug(http.responseText); ret=null; } }else{ if(_29f.mimetype=="text/json"||_29f.mimetype=="application/json"){ try{ ret=dj_eval("("+http.responseText+")"); } catch(e){ dojo.debug(e); dojo.debug(http.responseText); ret=false; } }else{ if((_29f.mimetype=="application/xml")||(_29f.mimetype=="text/xml")){ ret=http.responseXML; if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){ ret=dojo.dom.createDocumentFromText(http.responseText); } }else{ ret=http.responseText; } } } } if(_2a3){ addToCache(url,_2a2,_29f.method,http); } _29f[(typeof _29f.load=="function")?"load":"handle"]("load",ret,http,_29f); }else{ var _2a9=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); _29f[(typeof _29f.error=="function")?"error":"handle"]("error",_2a9,http,_29f); } } function setHeaders(http,_2ab){ if(_2ab["headers"]){ for(var _2ac in _2ab["headers"]){ if(_2ac.toLowerCase()=="content-type"&&!_2ab["contentType"]){ _2ab["contentType"]=_2ab["headers"][_2ac]; }else{ http.setRequestHeader(_2ac,_2ab["headers"][_2ac]); } } } } this.inFlight=[]; this.inFlightTimer=null; this.startWatchingInFlight=function(){ if(!this.inFlightTimer){ this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10); } }; this.watchInFlight=function(){ var now=null; if(!dojo.hostenv._blockAsync&&!_293._blockAsync){ for(var x=this.inFlight.length-1;x>=0;x--){ try{ var tif=this.inFlight[x]; if(!tif||tif.http._aborted||!tif.http.readyState){ this.inFlight.splice(x,1); continue; } if(4==tif.http.readyState){ this.inFlight.splice(x,1); doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache); }else{ if(tif.startTime){ if(!now){ now=(new Date()).getTime(); } if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){ if(typeof tif.http.abort=="function"){ tif.http.abort(); } this.inFlight.splice(x,1); tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req); } } } } catch(e){ try{ var _2b0=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e); tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2b0,tif.http,tif.req); } catch(e2){ dojo.debug("XMLHttpTransport error callback failed: "+e2); } } } } clearTimeout(this.inFlightTimer); if(this.inFlight.length==0){ this.inFlightTimer=null; return; } this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10); }; var _2b1=dojo.hostenv.getXmlhttpObject()?true:false; this.canHandle=function(_2b2){ return _2b1&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_2b2["mimetype"].toLowerCase()||""))&&!(_2b2["formNode"]&&dojo.io.formHasFile(_2b2["formNode"])); }; this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F"; this.bind=function(_2b3){ if(!_2b3["url"]){ if(!_2b3["formNode"]&&(_2b3["backButton"]||_2b3["back"]||_2b3["changeUrl"]||_2b3["watchForURL"])&&(!djConfig.preventBackButtonFix)){ dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request","Use dojo.undo.browser.addToHistory() instead.","0.4"); dojo.undo.browser.addToHistory(_2b3); return true; } } var url=_2b3.url; var _2b5=""; if(_2b3["formNode"]){ var ta=_2b3.formNode.getAttribute("action"); if((ta)&&(!_2b3["url"])){ url=ta; } var tp=_2b3.formNode.getAttribute("method"); if((tp)&&(!_2b3["method"])){ _2b3.method=tp; } _2b5+=dojo.io.encodeForm(_2b3.formNode,_2b3.encoding,_2b3["formFilter"]); } if(url.indexOf("#")>-1){ dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url); url=url.split("#")[0]; } if(_2b3["file"]){ _2b3.method="post"; } if(!_2b3["method"]){ _2b3.method="get"; } if(_2b3.method.toLowerCase()=="get"){ _2b3.multipart=false; }else{ if(_2b3["file"]){ _2b3.multipart=true; }else{ if(!_2b3["multipart"]){ _2b3.multipart=false; } } } if(_2b3["backButton"]||_2b3["back"]||_2b3["changeUrl"]){ dojo.undo.browser.addToHistory(_2b3); } var _2b8=_2b3["content"]||{}; if(_2b3.sendTransport){ _2b8["dojo.transport"]="xmlhttp"; } do{ if(_2b3.postContent){ _2b5=_2b3.postContent; break; } if(_2b8){ _2b5+=dojo.io.argsFromMap(_2b8,_2b3.encoding); } if(_2b3.method.toLowerCase()=="get"||!_2b3.multipart){ break; } var t=[]; if(_2b5.length){ var q=_2b5.split("&"); for(var i=0;i<q.length;++i){ if(q[i].length){ var p=q[i].split("="); t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+p[0]+"\"","",p[1]); } } } if(_2b3.file){ if(dojo.lang.isArray(_2b3.file)){ for(var i=0;i<_2b3.file.length;++i){ var o=_2b3.file[i]; t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content); } }else{ var o=_2b3.file; t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content); } } if(t.length){ t.push("--"+this.multipartBoundary+"--",""); _2b5=t.join("\r\n"); } }while(false); var _2be=_2b3["sync"]?false:true; var _2bf=_2b3["preventCache"]||(this.preventCache==true&&_2b3["preventCache"]!=false); var _2c0=_2b3["useCache"]==true||(this.useCache==true&&_2b3["useCache"]!=false); if(!_2bf&&_2c0){ var _2c1=getFromCache(url,_2b5,_2b3.method); if(_2c1){ doLoad(_2b3,_2c1,url,_2b5,false); return; } } var http=dojo.hostenv.getXmlhttpObject(_2b3); var _2c3=false; if(_2be){ var _2c4=this.inFlight.push({"req":_2b3,"http":http,"url":url,"query":_2b5,"useCache":_2c0,"startTime":_2b3.timeoutSeconds?(new Date()).getTime():0}); this.startWatchingInFlight(); }else{ _293._blockAsync=true; } if(_2b3.method.toLowerCase()=="post"){ if(!_2b3.user){ http.open("POST",url,_2be); }else{ http.open("POST",url,_2be,_2b3.user,_2b3.password); } setHeaders(http,_2b3); http.setRequestHeader("Content-Type",_2b3.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2b3.contentType||"application/x-www-form-urlencoded")); try{ http.send(_2b5); } catch(e){ if(typeof http.abort=="function"){ http.abort(); } doLoad(_2b3,{status:404},url,_2b5,_2c0); } }else{ var _2c5=url; if(_2b5!=""){ _2c5+=(_2c5.indexOf("?")>-1?"&":"?")+_2b5; } if(_2bf){ _2c5+=(dojo.string.endsWithAny(_2c5,"?","&")?"":(_2c5.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf(); } if(!_2b3.user){ http.open(_2b3.method.toUpperCase(),_2c5,_2be); }else{ http.open(_2b3.method.toUpperCase(),_2c5,_2be,_2b3.user,_2b3.password); } setHeaders(http,_2b3); try{ http.send(null); } catch(e){ if(typeof http.abort=="function"){ http.abort(); } doLoad(_2b3,{status:404},url,_2b5,_2c0); } } if(!_2be){ doLoad(_2b3,http,url,_2b5,_2c0); _293._blockAsync=false; } _2b3.abort=function(){ try{ http._aborted=true; } catch(e){ } return http.abort(); }; return; }; dojo.io.transports.addTransport("XMLHTTPTransport"); }; 
context: dojo.io.XMLHTTPTransport=new function(){var _293=this;var _294={};this.useCache=false;this.preventCache=false;function getCacheKey(url,_296,_297){return url+"|"+_296+"|"+_297.toLowerCase();}function addToCache(url,_299,_29a,http){_294[getCacheKey(url,_299,_29a)]=http;}function getFromCache(url,_29d,_29e){return _294[getCacheKey(url,_29d,_29e)];}this.clearCache=function(){_294={};};function doLoad(_29f,http,url,_2a2,_2a3){if(((http.status>=200)&&(http.status<300))||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){var ret;if(_29f.method.toLowerCase()=="head"){var _2a5=http.getAllResponseHeaders();ret={};ret.toString=function(){return _2a5;};var _2a6=_2a5.split(/[\r\n]+/g);for(var i=0;i<_2a6.length;i++){var pair=_2a6[i].match(/^([^:]+)\s*:\s*(.+)$/i);if(pair){ret[pair[1]]=pair[2];}}}else{if(_29f.mimetype=="text/javascript"){try{ret=dj_eval(http.responseText);}catch(e){dojo.debug(e);dojo.debug(http.responseText);ret=null;}}else{if(_29f.mimetype=="text/json"||_29f.mimetype=="application/json"){try{ret=dj_eval("("+http.responseText+")");}catch(e){dojo.debug(e);dojo.debug(http.responseText);ret=false;}}else{if((_29f.mimetype=="application/xml")||(_29f.mimetype=="text/xml")){ret=http.responseXML;if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){ret=dojo.dom.createDocumentFromText(http.responseText);}}else{ret=http.responseText;}}}}if(_2a3){addToCache(url,_2a2,_29f.method,http);}_29f[(typeof _29f.load=="function")?"load":"handle"]("load",ret,http,_29f);}else{var _2a9=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);_29f[(typeof _29f.error=="function")?"error":"handle"]("error",_2a9,http,_29f);}}function setHeaders(http,_2ab){if(_2ab["headers"]){for(var _2ac in _2ab["headers"]){if(_2ac.toLowerCase()=="content-type"&&!_2ab["contentType"]){_2ab["contentType"]=_2ab["headers"][_2ac];}else{http.setRequestHeader(_2ac,_2ab["headers"][_2ac]);}}}}this.inFlight=[];this.inFlightTimer=null;this.startWatchingInFlight=function(){if(!this.inFlightTimer){this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);}};this.watchInFlight=function(){var now=null;if(!dojo.hostenv._blockAsync&&!_293._blockAsync){for(var x=this.inFlight.length-1;x>=0;x--){try{var tif=this.inFlight[x];if(!tif||tif.http._aborted||!tif.http.readyState){this.inFlight.splice(x,1);continue;}if(4==tif.http.readyState){this.inFlight.splice(x,1);doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);}else{if(tif.startTime){if(!now){now=(new Date()).getTime();}if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){if(typeof tif.http.abort=="function"){tif.http.abort();}this.inFlight.splice(x,1);tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req);}}}}catch(e){try{var _2b0=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2b0,tif.http,tif.req);}catch(e2){dojo.debug("XMLHttpTransport error callback failed: "+e2);}}}}clearTimeout(this.inFlightTimer);if(this.inFlight.length==0){this.inFlightTimer=null;return;}this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);};var _2b1=dojo.hostenv.getXmlhttpObject()?true:false;this.canHandle=function(_2b2){return _2b1&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_2b2["mimetype"].toLowerCase()||""))&&!(_2b2["formNode"]&&dojo.io.formHasFile(_2b2["formNode"]));};this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";this.bind=function(_2b3){if(!_2b3["url"]){if(!_2b3["formNode"]&&(_2b3["backButton"]||_2b3["back"]||_2b3["changeUrl"]||_2b3["watchForURL"])&&(!djConfig.preventBackButtonFix)){dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request","Use dojo.undo.browser.addToHistory() instead.","0.4");dojo.undo.browser.addToHistory(_2b3);return true;}}var url=_2b3.url;var _2b5="";if(_2b3["formNode"]){var ta=_2b3.formNode.getAttribute("action");if((ta)&&(!_2b3["url"])){url=ta;}var tp=_2b3.formNode.getAttribute("method");if((tp)&&(!_2b3["method"])){_2b3.method=tp;}_2b5+=dojo.io.encodeForm(_2b3.formNode,_2b3.encoding,_2b3["formFilter"]);}if(url.indexOf("#")>-1){dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);url=url.split("#")[0];}if(_2b3["file"]){_2b3.method="post";}if(!_2b3["method"]){_2b3.method="get";}if(_2b3.method.toLowerCase()=="get"){_2b3.multipart=false;}else{if(_2b3["file"]){_2b3.multipart=true;}else{if(!_2b3["multipart"]){_2b3.multipart=false;}}}if(_2b3["backButton"]||_2b3["back"]||_2b3["changeUrl"]){dojo.undo.browser.addToHistory(_2b3);}var _2b8=_2b3["content"]||{};if(_2b3.sendTransport){_2b8["dojo.transport"]="xmlhttp";}do{if(_2b3.postContent){_2b5=_2b3.postContent;break;}if(_2b8){_2b5+=dojo.io.argsFromMap(_2b8,_2b3.encoding);}if(_2b3.method.toLowerCase()=="get"||!_2b3.multipart){break;}var t=[];if(_2b5.length){var q=_2b5.split("&");for(var i=0;i<q.length;++i){if(q[i].length){var p=q[i].split("=");t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+p[0]+"\"","",p[1]);}}}if(_2b3.file){if(dojo.lang.isArray(_2b3.file)){for(var i=0;i<_2b3.file.length;++i){var o=_2b3.file[i];t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);}}else{var o=_2b3.file;t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);}}if(t.length){t.push("--"+this.multipartBoundary+"--","");_2b5=t.join("\r\n");}}while(false);var _2be=_2b3["sync"]?false:true;var _2bf=_2b3["preventCache"]||(this.preventCache==true&&_2b3["preventCache"]!=false);var _2c0=_2b3["useCache"]==true||(this.useCache==true&&_2b3["useCache"]!=false);if(!_2bf&&_2c0){var _2c1=getFromCache(url,_2b5,_2b3.method);if(_2c1){doLoad(_2b3,_2c1,url,_2b5,false);return;}}var http=dojo.hostenv.getXmlhttpObject(_2b3);var _2c3=false;if(_2be){var _2c4=this.inFlight.push({"req":_2b3,"http":http,"url":url,"query":_2b5,"useCache":_2c0,"startTime":_2b3.timeoutSeconds?(new Date()).getTime():0});this.startWatchingInFlight();}else{_293._blockAsync=true;}if(_2b3.method.toLowerCase()=="post"){if(!_2b3.user){http.open("POST",url,_2be);}else{http.open("POST",url,_2be,_2b3.user,_2b3.password);}setHeaders(http,_2b3);http.setRequestHeader("Content-Type",_2b3.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2b3.contentType||"application/x-www-form-urlencoded"));try{http.send(_2b5);}catch(e){if(typeof http.abort=="function"){http.abort();}doLoad(_2b3,{status:404},url,_2b5,_2c0);}}else{var _2c5=url;if(_2b5!=""){_2c5+=(_2c5.indexOf("?")>-1?"&":"?")+_2b5;}if(_2bf){_2c5+=(dojo.string.endsWithAny(_2c5,"?","&")?"":(_2c5.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();}if(!_2b3.user){http.open(_2b3.method.toUpperCase(),_2c5,_2be);}else{http.open(_2b3.method.toUpperCase(),_2c5,_2be,_2b3.user,_2b3.password);}setHeaders(http,_2b3);try{http.send(null);}catch(e){if(typeof http.abort=="function"){http.abort();}doLoad(_2b3,{status:404},url,_2b5,_2c0);}}if(!_2be){doLoad(_2b3,http,url,_2b5,_2c0);_293._blockAsync=false;}_2b3.abort=function(){try{http._aborted=true;}catch(e){}return http.abort();};return;};dojo.io.transports.addTransport("XMLHTTPTransport");};
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/dojo.js/buggy/www/resources/dojo-ajax/dojo.js