Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) Bugfix for heise newsletter Problem See: http://www.yacy-forum.de/viewtopic.php?p=7836#7836

theli751a778b54b8
diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.java
index 52200956d..03faba792 100644
--- a/source/de/anomic/http/httpdProxyHandler.java
+++ b/source/de/anomic/http/httpdProxyHandler.java
@@ -921,6 +921,9 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
try {
remote = (yAddress == null) ? newhttpc(host, port, timeout) : newhttpc(yAddress, timeout);
res = remote.POST(remotePath, requestHeader, body);
+
+ // filtering out unwanted headers
+ this.removeHopByHopHeaders(res.responseHeader);
// if the content length is not set we need to use chunked content encoding
long contentLength = res.responseHeader.contentLength();
@@ -931,9 +934,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
chunked = new httpChunkedOutputStream(respond);
}
- // filtering out unwanted headers
- this.removeHopByHopHeaders(res.responseHeader);
-
+ // sending response headers
httpd.sendRespondHeader(conProp,respond,httpVer,Integer.parseInt(res.status.split(" ")[0]),res.responseHeader);
// respondHeader(respond, res.status, res.responseHeader);
res.writeContent((chunked != null) ? chunked : respond, null);