Files
spring-restdocs/spring-restdocs-core
Andy Wilkinson cfc413f7ed Avoid byte[] to String to byte[] conversion when pretty printing
Previously, PrettyPrintingContentModifier would convert the byte[]
content into a String and then back into a byte[]. It did so without
consideration for the content’s character set. As a result, it could
fail to preserve the correct character encoding.

This commit updates PrettyPrintingContentModifier to avoid converting
the content into a String and back into a byte[] and to work entirely
with byte arrays instead. Removing the intermediate String from the
process removes the possibility of the content becoming corrupted.

Closes gh-202
2016-02-15 12:28:07 +00:00
..