Skip to content

Commit

Permalink
JENKINS-10400 Added support for gzip log file also in case of raw tex…
Browse files Browse the repository at this point in the history
…t (consoleText link)
  • Loading branch information
vjuranek committed Jul 20, 2011
1 parent dcabd4b commit af7159c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/src/main/java/hudson/model/Run.java
Expand Up @@ -1675,7 +1675,17 @@ public void doConsoleText(StaplerRequest req, StaplerResponse rsp) throws IOExce
rsp.setContentType("text/plain;charset=UTF-8");
// Prevent jelly from flushing stream so Content-Length header can be added afterwards
FlushProofOutputStream out = new FlushProofOutputStream(rsp.getCompressedOutputStream(req));
getLogText().writeLogTo(0,out);
try{
getLogText().writeLogTo(0,out);
} catch (IOException e) {
// see comment in writeLogTo() method
InputStream input = getLogInputStream();
try {
IOUtils.copy(input, out);
} finally {
IOUtils.closeQuietly(input);
}
}
out.close();
}

Expand Down

0 comments on commit af7159c

Please sign in to comment.