-
-
Save asm256/04c2e4e922f9457aad51 to your computer and use it in GitHub Desktop.
thx >>5,>>6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/chaika/modules/server/thread.js b/chaika/modules/server/thread.js | |
index 97dd198..e5b55cd 100644 | |
--- a/chaika/modules/server/thread.js | |
+++ b/chaika/modules/server/thread.js | |
@@ -843,10 +843,14 @@ Thread2ch.prototype = { | |
// 差分GET | |
if(this.thread.datFile.exists() && this.thread.lastModified){ | |
let lastModified = this.thread.lastModified; | |
- let range = this.thread.datFile.fileSize - 1; //あぼーんされたか調べるために1byte余計に取得する | |
- this.httpChannel.setRequestHeader("Accept-Encoding", "", false); | |
this.httpChannel.setRequestHeader("If-Modified-Since", lastModified, false); | |
- this.httpChannel.setRequestHeader("Range", "bytes=" + range + "-", false); | |
+ if(this.httpChannel.URI.host.match(/2ch\.net$/)){ | |
+ this.httpChannel.setRequestHeader("Accept-Encoding", "gzip", false); | |
+ }else{ | |
+ let range = this.thread.datFile.fileSize - 1; //あぼーんされたか調べるために1byte余計に取得する | |
+ this.httpChannel.setRequestHeader("Accept-Encoding", "", false); | |
+ this.httpChannel.setRequestHeader("Range", "bytes=" + range + "-", false); | |
+ } | |
this._aboneChecked = false; | |
}else{ | |
this.httpChannel.setRequestHeader("Accept-Encoding", "gzip", false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment