Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Bugfix for problems with charset detection See: http://www.yacy-forum.de/viewtopic.php?p=26196
theli1c0e65f55f61
diff --git a/source/de/anomic/htmlFilter/htmlFilterInputStream.java b/source/de/anomic/htmlFilter/htmlFilterInputStream.javaindex d5d34e41f..501754b00 100644--- a/source/de/anomic/htmlFilter/htmlFilterInputStream.java+++ b/source/de/anomic/htmlFilter/htmlFilterInputStream.java@@ -91,7 +91,10 @@ public class htmlFilterInputStream extends InputStream implements htmlFilterEven// don't close writer here, otherwise it will shutdown our source stream// reset the buffer if not already done- if (this.mode != MODE_PRESCAN_FINISHED) this.bufferedIn.reset();+ if (this.mode != MODE_PRESCAN_FINISHED) {+ this.mode++;+ this.bufferedIn.reset();+ }// return scanning resultreturn (this.charsetChanged) ? this.detectedCharset : null;@@ -100,9 +103,7 @@ public class htmlFilterInputStream extends InputStream implements htmlFilterEvenpublic int read() throws IOException {// mode 0 is called from within the detectCharset functionif (this.mode == MODE_PRESCAN) {- if (this.endOfHead || this.charsetChanged || this.preRead >= this.preBufferSize) {- this.mode++;- this.bufferedIn.reset();+ if (this.endOfHead || this.charsetChanged || this.preRead >= this.preBufferSize-1) {return -1;}this.preRead++;