Fix passthrough servlet downstream logging.
@@ -132,10 +132,9 @@ public void handle(HttpRequest req, HttpResponse resp) throws IOException {
}
String charSet = connection.getContentEncoding() != null ? connection.getContentEncoding() : UTF_8.name();
- StringWriter logWriter = new StringWriter();
try (Reader reader = new InputStreamReader(in, charSet)) {
String content = CharStreams.toString(reader);
- LOG.info("To downstream: " + logWriter.toString());
+ LOG.info("To downstream: " + content);
resp.setContent(content.getBytes(charSet));
} finally {
in.close();
