Ensure that JSON is written to response body
Issue: SPR-15988
This commit is contained in:
@@ -356,7 +356,9 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
|
||||
throws IOException {
|
||||
|
||||
if (contentType.isCompatibleWith(APPLICATION_JSON)) {
|
||||
this.printer.appendTo(message, new OutputStreamWriter(output, charset));
|
||||
OutputStreamWriter writer = new OutputStreamWriter(output, charset);
|
||||
this.printer.appendTo(message, writer);
|
||||
writer.flush();
|
||||
}
|
||||
else {
|
||||
throw new IOException("protobuf-java-util does not support " + contentType + " format");
|
||||
|
||||
Reference in New Issue
Block a user