I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit f6d8200b authored by jrandom's avatar jrandom Committed by zzz
Browse files

oops (thanks Complication!)

parent aef33548
No related branches found
No related tags found
No related merge requests found
...@@ -236,7 +236,7 @@ class HTTPResponseOutputStream extends FilterOutputStream { ...@@ -236,7 +236,7 @@ class HTTPResponseOutputStream extends FilterOutputStream {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("Error decompressing: " + written + ", " + _in.getTotalRead() + "/" + _in.getTotalExpanded(), ioe); _log.warn("Error decompressing: " + written + ", " + _in.getTotalRead() + "/" + _in.getTotalExpanded(), ioe);
} finally { } finally {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN) && (_in != null))
_log.warn("After decompression, written=" + written + " read=" + _in.getTotalRead() _log.warn("After decompression, written=" + written + " read=" + _in.getTotalRead()
+ ", expanded=" + _in.getTotalExpanded() + ", remaining=" + _in.getRemaining() + ", expanded=" + _in.getTotalExpanded() + ", remaining=" + _in.getRemaining()
+ ", finished=" + _in.getFinished()); + ", finished=" + _in.getFinished());
...@@ -245,8 +245,8 @@ class HTTPResponseOutputStream extends FilterOutputStream { ...@@ -245,8 +245,8 @@ class HTTPResponseOutputStream extends FilterOutputStream {
} catch (IOException ioe) {} } catch (IOException ioe) {}
} }
long end = System.currentTimeMillis(); long end = System.currentTimeMillis();
double compressed = _in.getTotalRead(); double compressed = (_in != null ? _in.getTotalRead() : 0);
double expanded = _in.getTotalExpanded(); double expanded = (_in != null ? _in.getTotalExpanded() : 0);
double ratio = 0; double ratio = 0;
if (expanded > 0) if (expanded > 0)
ratio = compressed/expanded; ratio = compressed/expanded;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment