change for problem with NPE (seen as "PROXY Unknown Error while processing request")

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4745 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
danielr 17 years ago
parent 5813cc149f
commit ec84a52adb

@ -118,11 +118,15 @@ public class JakartaCommonsHttpResponse {
*/
public InputStream getDataAsStream() throws IOException {
InputStream inStream = method.getResponseBodyAsStream();
if (getResponseHeader().gzip()) {
inStream = new GZIPInputStream(inStream);
if(inStream != null) {
if (getResponseHeader().gzip()) {
inStream = new GZIPInputStream(inStream);
}
// count bytes for overall http-statistics
return new httpdByteCountInputStream(inStream, incomingAccountingName);
} else {
return null;
}
// count bytes for overall http-statistics
return new httpdByteCountInputStream(inStream, incomingAccountingName);
}
/*

Loading…
Cancel
Save