mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
fixed garbage in HTCACHE
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4663 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
225f9fd429
commit
8b2efb6f8c
|
@ -28,6 +28,7 @@ package de.anomic.http;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.util.zip.GZIPInputStream;
|
||||||
|
|
||||||
import org.apache.commons.httpclient.Header;
|
import org.apache.commons.httpclient.Header;
|
||||||
import org.apache.commons.httpclient.HttpMethod;
|
import org.apache.commons.httpclient.HttpMethod;
|
||||||
|
@ -115,8 +116,12 @@ public class JakartaCommonsHttpResponse implements HttpResponse {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public InputStream getDataAsStream() throws IOException {
|
public InputStream getDataAsStream() throws IOException {
|
||||||
|
InputStream inStream = method.getResponseBodyAsStream();
|
||||||
|
if(getResponseHeader().gzip()) {
|
||||||
|
inStream = new GZIPInputStream(inStream);
|
||||||
|
}
|
||||||
// count bytes for overall http-statistics
|
// count bytes for overall http-statistics
|
||||||
return new httpdByteCountInputStream(method.getResponseBodyAsStream(), incomingAccountingName);
|
return new httpdByteCountInputStream(inStream, incomingAccountingName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user