flyson
flyso****@users*****
2007年 1月 2日 (火) 22:34:05 JST
Index: bbs2chreader/content/bbs2chreader/board-rss.js diff -u bbs2chreader/content/bbs2chreader/board-rss.js:1.11 bbs2chreader/content/bbs2chreader/board-rss.js:1.12 --- bbs2chreader/content/bbs2chreader/board-rss.js:1.11 Sun Nov 6 21:23:20 2005 +++ bbs2chreader/content/bbs2chreader/board-rss.js Tue Jan 2 22:34:05 2007 @@ -123,7 +123,12 @@ httpChannel.setRequestHeader("User-Agent", this._bbs2chService.userAgent, false); this.wrappedJSObject = this; - httpChannel.asyncOpen(this, null); + try{ + httpChannel.asyncOpen(this, null); + }catch(ex){ + this.requestErrorEnd(); + return; + } }, @@ -138,7 +143,7 @@ onDataAvailable: function (aRequest, aContext, aInputStream, aOffset, aCount){ aRequest.QueryInterface(Components.interfaces.nsIHttpChannel); var httpStatus = aRequest.responseStatus; - + // KvÈîñªÈ¢ÈçI¹ if(!(httpStatus==200 || httpStatus==206)) return; @@ -150,12 +155,14 @@ onStopRequest: function(aRequest, aContext, aStatus){ aRequest.QueryInterface(Components.interfaces.nsIHttpChannel); var httpStatus = aRequest.responseStatus; - this._bInputStream.close(); var availableData = this._data.join(); this._data = null; if(availableData && httpStatus == 200){ this._bbs2chService.writeFile(this.boardItems.subjectFile.path, availableData, false); + }else{ + this.requestErrorEnd(); + return; } this.RespondRSS(); },