rem: if (DWREngine._reloadOnTextHml) { var contentType = batch.req.getResponseHeader('Content-Type'); if (contentType.match(/^text\/html/)) { document.location.reload(); return; } 
add: var contentType = batch.req.getResponseHeader('Content-Type'); if (DWREngine._textHtmlHandler && contentType.match(/^text\/html/)) { DWREngine._textHtmlHandler(); return; 
context: DWREngine._stateChange = function(batch) {  if (!batch.completed && batch.req.readyState == 4) {    try {      var reply = batch.req.responseText;      var status = batch.req.status;      if (reply == null || reply == "") {        DWREngine._handleMetaDataError(null, "No data received from server");        return;      }// DWR doesn't use response codes for failure conditions, so we should be able// to delete this. If no one complains, we will.//      if (status != 200) {//        if (reply == null) reply = "Unknown error occured";//        DWREngine._handleMetaDataError(null, reply);//        return;//      }      if (DWREngine._reloadOnTextHml) {        var contentType = batch.req.getResponseHeader('Content-Type');        if (contentType.match(/^text\/html/)) {          document.location.reload();          return;        }      }      // Comet replies might have already partially executed      if (batch.req == DWREngine._pollReq) {        DWREngine._processCometResponse(reply);      }      else {        // This should get us out of 404s etc.        if (reply.search("DWREngine._handle") == -1) {          DWREngine._handleMetaDataError(null, "Invalid reply from server");          return;        }        eval(reply);      }      // We're done. Clear up      DWREngine._clearUp(batch);    }    catch (ex) {      if (ex == null) ex = "Unknown error occured";      DWREngine._handleMetaDataError(null, ex);    }    finally {      // If there is anything on the queue waiting to go out, then send it.      // We don't need to check for ordered mode, here because when ordered mode      // gets turned off, we still process *waiting* batches in an ordered way.      if (DWREngine._batchQueue.length != 0) {        var sendbatch = DWREngine._batchQueue.shift();        DWREngine._sendData(sendbatch);        DWREngine._batches[DWREngine._batches.length] = sendbatch;      }    }  }};
meta: 266	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/266/c25c64c8d32b405347c9678cf1551aa0cce25cca/engine.js/buggy/java/org/directwebremoting/engine.js