From b79070b471b7d2f206914120ec87a67051ecaee1 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 7 Jul 2005 13:25:41 +0000 Subject: [PATCH] fixed proxy/scraper git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@385 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpdProxyHandler.java | 16 +++++++++++++--- yacy.blue | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.java index 7775ec8ef..9bfb98f38 100644 --- a/source/de/anomic/http/httpdProxyHandler.java +++ b/source/de/anomic/http/httpdProxyHandler.java @@ -576,9 +576,19 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt null, switchboard.defaultProxyProfile ); - - // make output stream - hfos = (gzippedOut != null) ? gzippedOut : ((chunkedOut != null)? chunkedOut : respond); + + // handle file types and make (possibly transforming) output stream + if ((!(transformer.isIdentityTransformer())) && + ((ext == null) || (!(plasmaParser.mediaExtContains(ext)))) && + (plasmaParser.realtimeParsableMimeTypesContains(res.responseHeader.mime()))) { + // make a transformer + this.theLogger.logDebug("create transformer for url " + url); + hfos = new htmlFilterOutputStream((gzippedOut != null) ? gzippedOut : ((chunkedOut != null)? chunkedOut : respond), null, transformer, (ext.length() == 0)); + } else { + // simply pass through without parsing + this.theLogger.logDebug("create passthrough for url " + url + ", extension '" + ext + "', mime-type '" + res.responseHeader.mime() + "'"); + hfos = (gzippedOut != null) ? gzippedOut : ((chunkedOut != null)? chunkedOut : respond); + } // handle incoming cookies handleIncomingCookies(res.responseHeader, host, ip); diff --git a/yacy.blue b/yacy.blue index 7d64d50e8..e36d486eb 100644 --- a/yacy.blue +++ b/yacy.blue @@ -1 +1,2 @@ ebcblue +und