* YaCy only supports gzip-encoding, so remove any other encoding from request

* fixes http://www.yacy-forum.org/viewtopic.php?f=2&t=163


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5132 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
f1ori 16 years ago
parent bb5c898441
commit bd0318ba81

@ -1184,6 +1184,13 @@ public final class httpdProxyHandler {
requestHeader.put(httpHeader.USER_AGENT, generateUserAgent(requestHeader)); requestHeader.put(httpHeader.USER_AGENT, generateUserAgent(requestHeader));
} }
// only gzip-encoding is supported, remove other encodings (e. g. deflate)
if (((String)requestHeader.get(httpRequestHeader.ACCEPT_ENCODING,"")).indexOf("gzip") != -1) {
requestHeader.put(httpRequestHeader.ACCEPT_ENCODING, "gzip");
} else {
requestHeader.put(httpRequestHeader.ACCEPT_ENCODING, "");
}
addXForwardedForHeader(conProp, requestHeader); addXForwardedForHeader(conProp, requestHeader);
} }

Loading…
Cancel
Save