Skip to content

Commit

Permalink
[FIXED JENKINS-13378] Remove XML string writer from IOException2 when…
Browse files Browse the repository at this point in the history
… XPath error occurs.

Remove XML string writer from IOException2 message when XPath error
occurs in /api/xml request.

The XML string writer has the potential to be very large (many
megabytes or even gigabytes) and these exceptions will be logged to
the default jenkins logfile by winstone. This has the potential to
quickly use all available disk space if, for example, a jenkins poller
(i.e. a chrome extension) makes frequent calls to the API that cause
errors.
  • Loading branch information
thomasvandoren committed Apr 7, 2012
1 parent 5432576 commit 668a0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/Api.java
Expand Up @@ -139,7 +139,7 @@ public void doXml(StaplerRequest req, StaplerResponse rsp,
}

} catch (DocumentException e) {
throw new IOException2("Failed to do XPath/wrapper handling. XML is as follows:"+sw,e);
throw new IOException2("Failed to do XPath/wrapper handling.",e);
}

OutputStream o = rsp.getCompressedOutputStream(req);
Expand Down

0 comments on commit 668a0cc

Please sign in to comment.