From 8d63a5887cfe4a0722da426a11223f64f837b381 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 2 Feb 2012 23:38:23 +0100 Subject: [PATCH] bugfixes --- htroot/Crawler_p.html | 2 +- source/net/yacy/document/parser/html/ContentScraper.java | 1 - source/net/yacy/document/parser/html/TransformerWriter.java | 1 + source/net/yacy/document/parser/htmlParser.java | 3 ++- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htroot/Crawler_p.html b/htroot/Crawler_p.html index 959ad4dec..ce86f9321 100644 --- a/htroot/Crawler_p.html +++ b/htroot/Crawler_p.html @@ -12,7 +12,7 @@ { var f = document.getElementById('QueuesTable'); f.contentWindow.location.reload(true); - setTimeout("refreshiframe()", 1000); + setTimeout("refreshiframe()", 2000); } diff --git a/source/net/yacy/document/parser/html/ContentScraper.java b/source/net/yacy/document/parser/html/ContentScraper.java index d48f3ac4e..b6ca55ff9 100644 --- a/source/net/yacy/document/parser/html/ContentScraper.java +++ b/source/net/yacy/document/parser/html/ContentScraper.java @@ -496,7 +496,6 @@ public class ContentScraper extends AbstractScraper implements Scraper { Log.logException(e); return cleanLine(super.stripAll(inlineHtml)); } finally { - scraper.close(); try { writer.close(); } catch (IOException e) { diff --git a/source/net/yacy/document/parser/html/TransformerWriter.java b/source/net/yacy/document/parser/html/TransformerWriter.java index 94af677d8..77a6b0bd6 100644 --- a/source/net/yacy/document/parser/html/TransformerWriter.java +++ b/source/net/yacy/document/parser/html/TransformerWriter.java @@ -510,6 +510,7 @@ public final class TransformerWriter extends Writer { // the filter process is messed up // instead, we simply flush the underlying output stream if (this.out != null) this.out.flush(); + if (this.scraper != null) this.scraper.finish(); // if you want to flush all, call close() at end of writing; } diff --git a/source/net/yacy/document/parser/htmlParser.java b/source/net/yacy/document/parser/htmlParser.java index 117cd884e..033ced94e 100644 --- a/source/net/yacy/document/parser/htmlParser.java +++ b/source/net/yacy/document/parser/htmlParser.java @@ -203,8 +203,9 @@ public class htmlParser extends AbstractParser implements Parser { } catch (final IOException e) { throw new Parser.Failure("IO error:" + e.getMessage(), location); } finally { + writer.flush(); sourceStream.close(); - writer.close(); + //writer.close(); } //OutputStream hfos = new htmlFilterOutputStream(null, scraper, null, false); //serverFileUtils.copy(sourceFile, hfos);