diff --git a/logbook-core/src/main/java/org/zalando/logbook/BodyReplacers.java b/logbook-core/src/main/java/org/zalando/logbook/BodyReplacers.java index 80289cfd5..dbda40333 100644 --- a/logbook-core/src/main/java/org/zalando/logbook/BodyReplacers.java +++ b/logbook-core/src/main/java/org/zalando/logbook/BodyReplacers.java @@ -23,7 +23,18 @@ public static BodyReplacer defaultValue() { @API(status = MAINTAINED) public static BodyReplacer binary() { final Predicate contentTypes = contentType( - "application/octet-stream", "application/pdf", "audio/*", "image/*", "video/*"); + "application/octet-stream", + "application/pdf", // Adobe Portable Document Format (PDF) + "application/vnd.ms-excel", // Microsoft Excel + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", // Microsoft Excel (OpenXML) + "application/msword", // Microsoft Word + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", // Microsoft Word (OpenXML) + "application/vnd.ms-powerpoint", // Microsoft PowerPoint + "application/vnd.openxmlformats-officedocument.presentationml.presentation", // Microsoft PowerPoint (OpenXML) + "audio/*", // Audio + "image/*", // Image + "video/*" // Video + ); return replaceBody(contentTypes, ""); } @@ -38,7 +49,8 @@ public static BodyReplacer stream() { "application/json-seq", // https://tools.ietf.org/html/rfc7464 "application/x-json-stream", // https://en.wikipedia.org/wiki/JSON_Streaming#Line_delimited_JSON "application/stream+json", // https://tools.ietf.org/html/draft-snell-activity-streams-type-01 - "text/event-stream" // https://tools.ietf.org/html/rfc6202 + "text/event-stream", // https://tools.ietf.org/html/rfc6202 + "application/x-ndjson" // https://ndjson.org ); return replaceBody(contentTypes, ""); }