[Bbs2ch-cvs 168] CVS update: bbs2chreader/content/bbs2chreader/server

Back to archive index

flyson flyso****@users*****
2006年 12月 10日 (日) 01:09:46 JST


Index: bbs2chreader/content/bbs2chreader/server/thread.js
diff -u bbs2chreader/content/bbs2chreader/server/thread.js:1.1.2.5 bbs2chreader/content/bbs2chreader/server/thread.js:1.1.2.6
--- bbs2chreader/content/bbs2chreader/server/thread.js:1.1.2.5	Sun Dec 10 00:03:28 2006
+++ bbs2chreader/content/bbs2chreader/server/thread.js	Sun Dec 10 01:09:46 2006
@@ -290,8 +290,18 @@
 
 
 	datDownload: function(){
-		this.httpChannel = this._ioService.newChannelFromURI(this.dat.datURL)
+
+		if(this._bbs2chService.pref.getBoolPref("fls.bbs2chreader.bypas_http_proxy")){
+				// ƒvƒƒNƒV‚ðƒoƒCƒpƒX‚µ‚½ nsIHttpChannel ‚̍쐬
+			var httpProtocolHandler = this._ioService.getProtocolHandler("http")
+					.QueryInterface(Components.interfaces.nsIHttpProtocolHandler);
+			this.httpChannel = httpProtocolHandler.newProxiedChannel(this.dat.datURL, null)
+					.QueryInterface(Components.interfaces.nsIHttpChannel);
+		}else{
+			this.httpChannel = this._ioService.newChannelFromURI(this.dat.datURL)
 					.QueryInterface(Components.interfaces.nsIHttpChannel);
+		}
+
 		this.httpChannel.requestMethod = "GET";
 		this.httpChannel.redirectionLimit = 0; // 302 “™‚̃Šƒ_ƒCƒŒƒNƒg‚ðs‚í‚È‚¢
 		this.httpChannel.loadFlags = this.httpChannel.LOAD_BYPASS_CACHE;
@@ -434,8 +444,17 @@
 		var datURL = this._ioService.newURI(datURLSpec, null, null)
 				.QueryInterface(Components.interfaces.nsIURL);
 
-		this.httpChannel = this._ioService.newChannelFromURI(datURL)
+		if(this._bbs2chService.pref.getBoolPref("fls.bbs2chreader.bypas_http_proxy")){
+				// ƒvƒƒNƒV‚ðƒoƒCƒpƒX‚µ‚½ nsIHttpChannel ‚̍쐬
+			var httpProtocolHandler = this._ioService.getProtocolHandler("http")
+					.QueryInterface(Components.interfaces.nsIHttpProtocolHandler);
+			this.httpChannel = httpProtocolHandler.newProxiedChannel(datURL, null)
 					.QueryInterface(Components.interfaces.nsIHttpChannel);
+		}else{
+			this.httpChannel = this._ioService.newChannelFromURI(datURL)
+					.QueryInterface(Components.interfaces.nsIHttpChannel);
+		}
+
 		this.httpChannel.requestMethod = "GET";
 		this.httpChannel.redirectionLimit = 0; // 302 “™‚̃Šƒ_ƒCƒŒƒNƒg‚ðs‚í‚È‚¢
 		this.httpChannel.loadFlags = this.httpChannel.LOAD_BYPASS_CACHE;


bbs2ch-cvs メーリングリストの案内
Back to archive index